File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes get a file into an blob Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "get a file into an blob" Watch "get a file into an blob" New topic
Author

get a file into an blob

holger Hahn
Greenhorn

Joined: Jun 14, 2005
Posts: 9
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

Joined: Jan 10, 2002
Posts: 56185
    
  13

Please read this topic.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
holger Hahn
Greenhorn

Joined: Jun 14, 2005
Posts: 9
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: get a file into an blob
 
Similar Threads
How to upload a byte array into BLOB column?
How to see the content of BLOB Field
need to read the blob and convert it into a file
to get Database blob to JPG file
Inserting BLOB's in database