com.metamatrix.common.types
Class BlobType
java.lang.Object
com.metamatrix.common.types.Streamable<java.sql.Blob>
com.metamatrix.common.types.BlobType
- All Implemented Interfaces:
- java.io.Serializable, java.sql.Blob
public final class BlobType
- extends Streamable<java.sql.Blob>
- implements java.sql.Blob
Represent a value of type "blob", which can be streamable from client
- See Also:
- Serialized Form
Constructor Summary |
BlobType(java.sql.Blob blob)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BlobType
public BlobType(java.sql.Blob blob)
getBinaryStream
public java.io.InputStream getBinaryStream()
throws java.sql.SQLException
- Specified by:
getBinaryStream
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.getBinaryStream()
getBytes
public byte[] getBytes(long pos,
int length)
throws java.sql.SQLException
- Specified by:
getBytes
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.getBytes(long, int)
length
public long length()
throws java.sql.SQLException
- Specified by:
length
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.length()
position
public long position(java.sql.Blob pattern,
long start)
throws java.sql.SQLException
- Specified by:
position
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.position(java.sql.Blob, long)
position
public long position(byte[] pattern,
long start)
throws java.sql.SQLException
- Specified by:
position
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.position(byte[], long)
setBinaryStream
public java.io.OutputStream setBinaryStream(long pos)
throws java.sql.SQLException
- Specified by:
setBinaryStream
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.setBinaryStream(long)
setBytes
public int setBytes(long pos,
byte[] bytes,
int offset,
int len)
throws java.sql.SQLException
- Specified by:
setBytes
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- Since:
- 4.3
- See Also:
Blob.setBytes(long, byte[], int, int)
setBytes
public int setBytes(long pos,
byte[] bytes)
throws java.sql.SQLException
- Specified by:
setBytes
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.setBytes(long, byte[])
truncate
public void truncate(long len)
throws java.sql.SQLException
- Specified by:
truncate
in interface java.sql.Blob
- Throws:
java.sql.SQLException
- See Also:
Blob.truncate(long)
getByteArray
public static byte[] getByteArray(java.sql.Blob blob)
throws java.sql.SQLException,
java.io.IOException
- Utility Method to convert blob into byte array
- Parameters:
blob
-
- Returns:
- byte array
- Throws:
java.sql.SQLException
java.io.IOException
free
public void free()
throws java.sql.SQLException
- Specified by:
free
in interface java.sql.Blob
- Throws:
java.sql.SQLException
getBinaryStream
public java.io.InputStream getBinaryStream(long pos,
long length)
throws java.sql.SQLException
- Specified by:
getBinaryStream
in interface java.sql.Blob
- Throws:
java.sql.SQLException
createBlob
public static javax.sql.rowset.serial.SerialBlob createBlob(byte[] bytes)
Copyright © 2009. All Rights Reserved.