This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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:
 
Have you checked out Aspose?
 
subject: How to convert the BLOB into String
 
It's not a secret anymore!