Wednesday, April 4, 2001 09:19 AM
Most databases support a data type which contains an arbitrary amount of binary data (frequently called BLOBs, or B
If you're using JDBC v2.0 or greater, you can use the
java.sql.Blob interface, and the
java.sql.ResultSet.getBlob(...) methods. The
Blob interface has a method
getBinaryStream() which returns a
java.io.InputStream from which you should be able to create an Image.
If you're using a previous version (or you just want to), you can use the
java.sql.ResultSet.getBinaryStream(...) methods which return
InputStreams also, which can be read. The JDBC API suggests that they be used with LONGVARBINARY column types.