Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 The Software Craftsman this week in the Agile 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
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:
 
 
subject: How to convert the BLOB into String