DB2GENERAL Java class: COM.ibm.db2.app.Blob
An instance of this class is passed by the database to represent a BLOB as routine input, and can be passed back as output.
The application might create instances, but only in the context of an executing routine. Uses of these objects outside such a context will throw an exception.
The following methods are
associated with the COM.ibm.db2.app.Blob
class:
public long size() throws Exception
This function returns the length (in bytes) of the BLOB.
public java.io.InputStream getInputStream() throws Exception
This function returns a new InputStream to read the contents of the BLOB. Efficient seek/mark operations are available on that object.
public java.io.OutputStream getOutputStream() throws Exception
This
function returns a new OutputStream to append bytes to the BLOB. Appended
bytes become immediately visible on all existing InputStream instances
produced by this object's getInputStream()
call.