java.sql.BLOB interface .
Objects created using the ImportBlob class are
intended to be be used to create a blob object of the data stored
in an import file or as an hex string. Only the routines that
are needed read the blob data for the blob columns by the
inserts done through the VTI have real implementations,
Other routines are dummy ones to satisfy java.sql.Blob
interface.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private long | |
| private long | |
| private ImportLobFile |
| Access | Constructor and Description |
|---|---|
| public | ImportBlob(ImportLobFile
lob file resource object, using which data is read. lobFile, long byte offset in the file, of this blob columb data. position, long length of this blob object data. length)Create a import Blob object, that reads |
| public | ImportBlob(byte[]
byte array that contains the blob data. data)Create a import Blob object, whose value is the give hex data string. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public InputStream | Returns: a stream containing theBLOB dataImplements java. Returns |
| public InputStream | getBinaryStream(long
the offset to the first byte of the partial value to be
retrieved. The first byte in the pos, long Blob is at position 1.the length in bytes of the partial value to be retrieved length)Implements java. Raise error, not used by import |
| public byte[] | getBytes(long
the ordinal position of the first byte in the
pos, int BLOB value to be extracted; the first byte is at
position 1the number of consecutive bytes to be copied; the value
for length must be 0 or greater length)Implements java. This routine is not used by the VTI to read the data, so no implementatio is provided , an exception is thrown if used. |
| public long | Returns: length of theBLOB in bytesImplements java. Returns the number of bytes in this |
| private SQLException | |
| public long | position(byte[]
the byte array for which to search pattern, long the position at which to begin searching; the
first position is 1 start)Implements java. This routine is not used by the VTI to read the data, so no implementatio is provided , an exception is thrown if used. |
| public long | position(Blob
the pattern, long Blob object designating
the BLOB value for which to searchthe position in the start)BLOB value
at which to begin searching; the first position is 1Implements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used. |
| public OutputStream | setBinaryStream(long
the position in the pos)BLOB value at which
to start writing; the first position is 1Implements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used. |
| public int | setBytes(long
the position in the pos, byte[] BLOB object at which
to start writing; the first position is 1the array of bytes to be written to the bytes)BLOB
value that this Blob object representsImplements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used. |
| public int | setBytes(long
the position in the pos, byte[] BLOB object at which
to start writing; the first position is 1the array of bytes to be written to this bytes, int BLOB
objectthe offset into the array offset, int bytes at which
to start reading the bytes to be setthe number of bytes to be written to the len)BLOB
value from the array of bytes bytesImplements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used. |
| public void | truncate(long
the length, in bytes, to which the len)BLOB value
that this Blob object represents should be truncatedImplements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used. |
| blobData | back to summary |
|---|---|
| private byte[] blobData | |
| blobLength | back to summary |
|---|---|
| private long blobLength | |
| blobPosition | back to summary |
|---|---|
| private long blobPosition | |
| lobFile | back to summary |
|---|---|
| private ImportLobFile lobFile | |
| ImportBlob | back to summary |
|---|---|
| public ImportBlob(ImportLobFile lobFile, long position, long length) Create a import Blob object, that reads
| |
| ImportBlob | back to summary |
|---|---|
| public ImportBlob(byte[] data) Create a import Blob object, whose value is the give hex data string.
| |
| free | back to summary |
|---|---|
| public void free() throws SQLException Implements java. Raise error, not used by import
| |
| getBinaryStream | back to summary |
|---|---|
| public InputStream getBinaryStream() throws SQLException Implements java. Returns
| |
| getBinaryStream | back to summary |
|---|---|
| public InputStream getBinaryStream(long pos, long length) throws SQLException Implements java. Raise error, not used by import
| |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes(long pos, int length) throws SQLException Implements java. This routine is not used by the VTI to read the data, so no implementatio is provided , an exception is thrown if used.
| |
| length | back to summary |
|---|---|
| public long length() throws SQLException Implements java. Returns the number of bytes in this
| |
| methodNotImplemented | back to summary |
|---|---|
| private SQLException methodNotImplemented() Return an unimplemented feature error | |
| position | back to summary |
|---|---|
| public long position(byte[] pattern, long start) throws SQLException Implements java. This routine is not used by the VTI to read the data, so no implementatio is provided , an exception is thrown if used.
| |
| position | back to summary |
|---|---|
| public long position(Blob pattern, long start) throws SQLException Implements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used.
| |
| setBinaryStream | back to summary |
|---|---|
| public OutputStream setBinaryStream(long pos) throws SQLException Implements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used.
| |
| setBytes | back to summary |
|---|---|
| public int setBytes(long pos, byte[] bytes) throws SQLException Implements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used.
| |
| setBytes | back to summary |
|---|---|
| public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException Implements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used.
| |
| truncate | back to summary |
|---|---|
| public void truncate(long len) throws SQLException Implements java. This routine is not used by the VTI to read the data, so no implementation is provided , an exception is thrown if used.
| |