Package org.teiid.core.types
Class BlobType
- java.lang.Object
-
- org.teiid.core.types.Streamable<Blob>
-
- org.teiid.core.types.BlobType
-
- All Implemented Interfaces:
Externalizable,Serializable,Comparable<BlobType>,Blob
- Direct Known Subclasses:
AbstractGeospatialType
public class BlobType extends Streamable<Blob> implements Blob, Comparable<BlobType>
Represent a value of type "blob", which can be streamable from client- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.teiid.core.types.Streamable
CHARSET, ENCODING, length, reference, STREAMING_BATCH_SIZE_IN_BYTES
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(BlobType o)static SerialBlobcreateBlob(byte[] bytes)booleanequals(Object obj)voidfree()InputStreamgetBinaryStream()InputStreamgetBinaryStream(long pos, long len)byte[]getBytes(long pos, int len)inthashCode()longposition(byte[] pattern, long start)longposition(Blob pattern, long start)protected voidreadReference(ObjectInput in)OutputStreamsetBinaryStream(long pos)intsetBytes(long pos, byte[] bytes)intsetBytes(long pos, byte[] bytes, int offset, int len)voidtruncate(long len)protected voidwriteReference(DataOutput out)-
Methods inherited from class org.teiid.core.types.Streamable
getLength, getReference, getReferenceStreamId, isBinary, length, readExternal, setReference, setReferenceStreamId, toString, writeExternal
-
-
-
-
Constructor Detail
-
BlobType
public BlobType()
-
BlobType
public BlobType(byte[] bytes)
-
BlobType
public BlobType(Blob blob)
-
-
Method Detail
-
getBinaryStream
public InputStream getBinaryStream() throws SQLException
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException- See Also:
Blob.getBinaryStream()
-
getBytes
public byte[] getBytes(long pos, int len) throws SQLException- Specified by:
getBytesin interfaceBlob- Throws:
SQLException- See Also:
Blob.getBytes(long, int)
-
position
public long position(Blob pattern, long start) throws SQLException
- Specified by:
positionin interfaceBlob- Throws:
SQLException- See Also:
Blob.position(java.sql.Blob, long)
-
position
public long position(byte[] pattern, long start) throws SQLException- Specified by:
positionin interfaceBlob- Throws:
SQLException- See Also:
Blob.position(byte[], long)
-
setBinaryStream
public OutputStream setBinaryStream(long pos) throws SQLException
- Specified by:
setBinaryStreamin interfaceBlob- Throws:
SQLException- See Also:
Blob.setBinaryStream(long)
-
setBytes
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException- Specified by:
setBytesin interfaceBlob- Throws:
SQLException- Since:
- 4.3
- See Also:
Blob.setBytes(long, byte[], int, int)
-
setBytes
public int setBytes(long pos, byte[] bytes) throws SQLException- Specified by:
setBytesin interfaceBlob- Throws:
SQLException- See Also:
Blob.setBytes(long, byte[])
-
truncate
public void truncate(long len) throws SQLException- Specified by:
truncatein interfaceBlob- Throws:
SQLException- See Also:
Blob.truncate(long)
-
free
public void free() throws SQLException- Specified by:
freein interfaceBlob- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(long pos, long len) throws SQLException
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException
-
createBlob
public static SerialBlob createBlob(byte[] bytes)
-
readReference
protected void readReference(ObjectInput in) throws IOException
- Specified by:
readReferencein classStreamable<Blob>- Throws:
IOException
-
writeReference
protected void writeReference(DataOutput out) throws IOException
- Specified by:
writeReferencein classStreamable<Blob>- Throws:
IOException
-
compareTo
public int compareTo(BlobType o)
- Specified by:
compareToin interfaceComparable<BlobType>
-
-