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 int
compareTo(BlobType o)
static SerialBlob
createBlob(byte[] bytes)
boolean
equals(Object obj)
void
free()
InputStream
getBinaryStream()
InputStream
getBinaryStream(long pos, long len)
byte[]
getBytes(long pos, int len)
int
hashCode()
long
position(byte[] pattern, long start)
long
position(Blob pattern, long start)
protected void
readReference(ObjectInput in)
OutputStream
setBinaryStream(long pos)
int
setBytes(long pos, byte[] bytes)
int
setBytes(long pos, byte[] bytes, int offset, int len)
void
truncate(long len)
protected void
writeReference(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:
getBinaryStream
in interfaceBlob
- Throws:
SQLException
- See Also:
Blob.getBinaryStream()
-
getBytes
public byte[] getBytes(long pos, int len) throws SQLException
- Specified by:
getBytes
in interfaceBlob
- Throws:
SQLException
- See Also:
Blob.getBytes(long, int)
-
position
public long position(Blob pattern, long start) throws SQLException
- Specified by:
position
in interfaceBlob
- Throws:
SQLException
- See Also:
Blob.position(java.sql.Blob, long)
-
position
public long position(byte[] pattern, long start) throws SQLException
- Specified by:
position
in interfaceBlob
- Throws:
SQLException
- See Also:
Blob.position(byte[], long)
-
setBinaryStream
public OutputStream setBinaryStream(long pos) throws SQLException
- Specified by:
setBinaryStream
in interfaceBlob
- Throws:
SQLException
- See Also:
Blob.setBinaryStream(long)
-
setBytes
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException
- Specified by:
setBytes
in 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:
setBytes
in interfaceBlob
- Throws:
SQLException
- See Also:
Blob.setBytes(long, byte[])
-
truncate
public void truncate(long len) throws SQLException
- Specified by:
truncate
in interfaceBlob
- Throws:
SQLException
- See Also:
Blob.truncate(long)
-
free
public void free() throws SQLException
- Specified by:
free
in interfaceBlob
- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(long pos, long len) throws SQLException
- Specified by:
getBinaryStream
in interfaceBlob
- Throws:
SQLException
-
createBlob
public static SerialBlob createBlob(byte[] bytes)
-
readReference
protected void readReference(ObjectInput in) throws IOException
- Specified by:
readReference
in classStreamable<Blob>
- Throws:
IOException
-
writeReference
protected void writeReference(DataOutput out) throws IOException
- Specified by:
writeReference
in classStreamable<Blob>
- Throws:
IOException
-
compareTo
public int compareTo(BlobType o)
- Specified by:
compareTo
in interfaceComparable<BlobType>
-
-