Reads a chunk of data from the stream.
public byte[] read(long length)
read returns a chunk of binary data read from the stream, or a null value if the end of the stream has been reached.
Book book = Book.findByPrimaryKey(bookID);
com.sybase.persistence.BigBinary image = book.getCover();
int bufferLength = 1024;
image.openForRead();
byte[] binary = image.read(bufferLength);
while (binary != null)
{
binary = image.read(bufferLength);
}
image.close();