This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jpg to BLOB and BLOB to JPG

 
ram kumar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I have to convert a .jpg file to BLOB and upload it to Oracle DB.


Read the same BLOB and convert that in to jpg and save that to disk.


could some one help me with some links and sample codes .

Am in urgent need of it
 
Campbell Ritchie
Sheriff
Pie
Posts: 50196
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That doesn't look like a "general" Java question. Moving.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ram,
Have you read the JDBC tutorial yet? It contains code for dealing with BLOBs.

Feel free to post a more specific question to get more specific help.
 
Joseph Macer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Jeanne mentioned, the JDBC is a good way to deal with databases. I use JDBC to perform all sorts of operations on a MySQL database without much trouble. Since you're storing a file, you could simple open a stream to the file like normal and read it directly into a String, for example, and save the String into a BLOB.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic