• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Reading a blob object from a database

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to read a blob value from a Mysql database.But this field is obtained as java.sql.types varlongbinary instead of BLOB.
Now when i tried to read the content of the blob field which is an xml using
getbinaryStream method, i encountered some problems.
I have read the contents into a byte array using read method of inputstream
and when i converted this byte array to a string using toString it returns the byte array object value and not the orirginal contents.
Actually i want to read this content and insert into a clob field of an oracle database.
Somebody Please help me to sort out the problem.
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"sajeev V",

You have already received two warning to change your display name to conform to JavaRanch standards. Your name must be a first name and a last name separated by a space. An initial will not do.

This is your final warning. Change your display name to a valid value prior to your next post. Otherwise, your account will be closed.

bear
JavaRanch Sheriff
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic