public class Lob extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String |
charData |
protected byte[] |
data |
protected String |
encoding |
protected ExceptionInterceptor |
exceptionInterceptor |
protected int |
length |
protected com.oceanbase.jdbc.ObLobLocator |
locator |
protected int |
offset |
| Constructor and Description |
|---|
Lob() |
Lob(byte[] bytes)
Creates a blob with content.
|
Lob(byte[] bytes,
ExceptionInterceptor exceptionInterceptor) |
Lob(byte[] bytes,
int offset,
int length)
Creates a blob with content.
|
| Modifier and Type | Method and Description |
|---|---|
void |
free()
This method frees the
Blob object and releases the resources that it holds. |
InputStream |
getBinaryStream() |
InputStream |
getBinaryStream(long pos,
long length) |
byte[] |
getBytes(long pos,
int length) |
boolean |
isEmptyLob() |
OutputStream |
setBinaryStream(long pos) |
int |
setBytes(long pos,
byte[] bytes) |
protected byte[] data
protected transient int offset
protected transient int length
protected com.oceanbase.jdbc.ObLobLocator locator
protected String encoding
protected String charData
protected ExceptionInterceptor exceptionInterceptor
public Lob()
public Lob(byte[] bytes)
bytes - the content for the blob.public Lob(byte[] bytes,
ExceptionInterceptor exceptionInterceptor)
public Lob(byte[] bytes,
int offset,
int length)
bytes - the content for the blob.offset - offsetlength - lengthpublic OutputStream setBinaryStream(long pos) throws SQLException
SQLExceptionpublic InputStream getBinaryStream() throws SQLException
SQLExceptionpublic InputStream getBinaryStream(long pos, long length) throws SQLException
SQLExceptionpublic int setBytes(long pos,
byte[] bytes)
throws SQLException
SQLExceptionpublic void free()
Blob object and releases the resources that it holds. The
object is invalid once the free method is called.
After free has been called, any attempt to invoke a method other than
free will result in a SQLException being thrown. If free is
called multiple times, the subsequent calls to free are treated as a no-op.
public boolean isEmptyLob()
public byte[] getBytes(long pos,
int length)
throws SQLException
SQLExceptionCopyright © 2022 oceanbase.com. All rights reserved.