Package com.ocient.jdbc
Class XGBlob
java.lang.Object
com.ocient.jdbc.XGBlob
- All Implemented Interfaces:
Blob
An in-memory implementation of java.sql.Blob. This class can be either read-only (for data from
an XGResultSet) or writeable (for data created via XGConnection.createBlob()).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfree()getBinaryStream(long pos, long length) byte[]getBytes(long pos, int length) longlength()longposition(byte[] pattern, long start) longsetBinaryStream(long pos) intsetBytes(long pos, byte[] bytes) intsetBytes(long pos, byte[] bytes, int offset, int len) voidtruncate(long len)
-
Constructor Details
-
XGBlob
public XGBlob()Creates a new, writeable, empty XGBlob. Used by Connection.createBlob(). -
XGBlob
public XGBlob(byte[] data) Creates a new, read-only XGBlob wrapping the given byte array. Used by XGResultSet.getBlob().- Parameters:
data- The byte data to wrap.
-
-
Method Details
-
length
- Specified by:
lengthin interfaceBlob- Throws:
SQLException
-
getBytes
- Specified by:
getBytesin interfaceBlob- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException
-
position
- Specified by:
positionin interfaceBlob- Throws:
SQLException
-
position
- Specified by:
positionin interfaceBlob- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException
-
free
- Specified by:
freein interfaceBlob- Throws:
SQLException
-
setBytes
- Specified by:
setBytesin interfaceBlob- Throws:
SQLException
-
setBytes
- Specified by:
setBytesin interfaceBlob- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfaceBlob- Throws:
SQLException
-
truncate
- Specified by:
truncatein interfaceBlob- Throws:
SQLException
-