O'Reilly logo

PURE Java™ 2 by Kenneth Litwak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interface and Class Details

Interface Blob

public abstract interface Blob
						

This interface provides the method definition for a Blob. This is the Java version of the SQL data type Blob, which maps a binary large object to a column in a relational table.

Blobs can be useful in Java when you're working with a relational table to store an entire object. A Blob in Java differs from most SQL data types in that it stores a pointer to the data, rather than the data itself, in the column. The Blob is only valid during the transaction that created it. You can access a method through getBlob() and setBlob() in ResultSet, PreparedStatement, and CallableStatement.

Methods
InputStream    getBinaryStream()
byte[]         getBytes(long pos, int length)
long           length() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required