• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Display the BLOB Field

 
gurusamy sengodan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have written the code to get the BLOB Fields from the table.
That BLOB Fields contain XML.
How to view the content of that BLOB Field i mean that XML.
I want to see the content of That XML.
The code snippet:-
****************
Blob aBlob = resultSet.getBlob(1);

Now the aBlob contains the XML. How to display the content of aBlob.
I want to see the content through the code.


Thanks in Advance
 
Scott Selikoff
author
Saloon Keeper
Posts: 4010
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer to the Blob API http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Blob.html

You can read the Blob as an InputStream and then for the most part treat it as you would read a file. You can pass the InputStream to a XML constructor and load it as an XML object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic