File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes How to convert the BLOB into String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to convert the BLOB into String" Watch "How to convert the BLOB into String" New topic

How to convert the BLOB into String

gurusamy sengodan
Ranch Hand

Joined: Oct 13, 2005
Posts: 41
I got a blob column from the database.
It contains one XML File.
How to convert it into String.
I need the code for how to convert the blob into String

Thanks in Advance.
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

a search on "java convert blob to string" will give you hints

reading the InputStreamReader API will give you more hints:

An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset.

I think it would look like this:
I agree. Here's the link:
subject: How to convert the BLOB into String
It's not a secret anymore!