have a look at the javadoc for blob.
it has a method called "setBytes(long pos, byte[] bytes)".
instantiate blob, set the data by the method and pass it to a prepared insert statement.
that's it. by the way: there are a lot of examples reachable through http://www.google.com/search?q=jdbc+blob
Thanks, but how to instantiate Blob?
when I try
Blob bl = new Blob();
Eclipse underlines Blob() and says: "Cannot instantiate the type Blob, since it is not a concrete class."
As denoted in the javadoc, java.sql.Blob is an interface and thus not instantiable. you will have to look out for the concrete implementation of your driver. eg if you use mysql, there should be somewhere in the package a CLASS called blob. this one you can instantiate.
You don't have to use any blob class/interface to store a pile of bytes in an SQL database. You open a byte stream using the i/o stream methods defined for the Column object, write the bytes to that stream and close it, that works for all SQL databases.