Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.sql

Interface Blob

java.lang.Object
|
+--java.sql.Blob


public interface Blob

This interface specified methods for accessing a SQL BLOB (Binary Large OBject) type.

Since:Author:

Method Summary

java.io.InputStreamgetBinaryStream()

This method returns a stream that will read the bytes of the BLOB.
byte[]getBytes(long pos, int length)

This method returns up to the requested bytes of this BLOB as a byte array.
longlength()

This method returns the number of bytes in the BLOB.
longposition(byte[] pattern, long start)

This method returns the index into the BLOB at which the first instance of the specified bytes occur.
longposition(java.sql.Blob pattern, long start)

This method returns the index into the BLOB at which the first instance of the specified pattern occurs.
java.io.OutputStreamsetBinaryStream(long pos)

intsetBytes(long pos, byte[] bytes)

intsetBytes(long pos, byte[] bytes, int offset, int len)

voidtruncate(long len)

Method Details

getBinaryStream

public InputStream getBinaryStream()

This method returns a stream that will read the bytes of the BLOB.

Returns:

Throws:


getBytes

public byte[] getBytes(long pos, int length)

This method returns up to the requested bytes of this BLOB as a byte array.

Parameters:

Returns:

Throws:


length

public long length()

This method returns the number of bytes in the BLOB.

Returns:

Throws:


position

public long position(byte[] pattern, long start)

This method returns the index into the BLOB at which the first instance of the specified bytes occur. The searching starts at the specified index into the BLOB.

Parameters:

Returns:

Throws:


position

public long position(java.sql.Blob pattern, long start)

This method returns the index into the BLOB at which the first instance of the specified pattern occurs. The searching starts at the specified index into this BLOB. The bytes in the specified Blob are used as the search pattern.

Parameters:

Returns:

Throws:


setBinaryStream

public OutputStream setBinaryStream(long pos)

Since:Parameters:

Throws:


setBytes

public int setBytes(long pos, byte[] bytes)

Since:Parameters:

Throws:


setBytes

public int setBytes(long pos, byte[] bytes, int offset, int len)

Since:Parameters:

Throws:


truncate

public void truncate(long len)

Since:Parameters:

Throws: