This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

storing BLOB

 
muthu muruges
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having binary(digest using SHA1) value in byte array. I want to store it in to database. The database column type is BLOB(Mysql). I thought of using setBlob method of PreparedStatement, but the Blob is an interface So I coulnd't create the instance for that.

How to create Blob instance in java, any standard implementation is available?

Please let me know if any other option is there other than Blob columns to store binary values.

Thanks in advance,
Muruges
 
ch praveen
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello muthu muruges,

For storing binary values, you may use getBytes() or setBytes() methods. Wish you best of luck.

Regards,
Ch.Praveen Kumar.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic