wood burning stoves 2.0*
The moose likes JDBC 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to convert the BLOB into String" Watch "How to convert the BLOB into String" New topic
Author

How to convert the BLOB into String

gurusamy sengodan
Ranch Hand

Joined: Oct 13, 2005
Posts: 41
Hi,
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: http://aspose.com/file-tools
 
subject: How to convert the BLOB into String
 
Similar Threads
conversion between CLOB/BLOB and String
byte[] to blob
How to convert FormFile into BLOB object?
converting Blob to a String for calling POST
How to convert "java.sql.Blob" object to "java.sql.Clob" object?