Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get a file into an blob

 
holger Hahn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me,

I don't know ho to get a tiff-file into an Blob to write it in an DataBase with entity Beans. Can someone give an code example?
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
 
holger Hahn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh Sorry
I will specify what I mean

i have an getter and setter method in my Entity Bean. The parameter of the getter and setter is an byte array. (public abstract byte [] getPicData (); and public abstract void setPicData(byte [] picData);
I use Jboss application Server V4.0 and MySQL V.4
When I read a file in png-Format from the client and write it with the help of my Entity Bean in the database (use CMP). The problem is that the file is 200kb befor i write it in the database and 63kb (65565bytes) when i get it from the database. I don't know why

Please help me
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic