Package com.microsoft.sqlserver.jdbc
Class SQLServerBlob
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.SQLServerBlob
-
- All Implemented Interfaces:
Serializable,Blob
public final class SQLServerBlob extends Object implements Blob, Serializable
Represents a binary LOB object and implements a java.sql.Blob.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SQLServerBlob(SQLServerConnection connection, byte[] data)Deprecated.UseSQLServerConnection.createBlob()instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfree()InputStreamgetBinaryStream()InputStreamgetBinaryStream(long pos, long length)byte[]getBytes(long pos, int length)longlength()longposition(byte[] bPattern, long start)longposition(Blob pattern, long start)OutputStreamsetBinaryStream(long pos)intsetBytes(long pos, byte[] bytes)intsetBytes(long pos, byte[] bytes, int offset, int len)StringtoString()Returns string representation of objectvoidtruncate(long len)
-
-
-
Constructor Detail
-
SQLServerBlob
@Deprecated public SQLServerBlob(SQLServerConnection connection, byte[] data)
Deprecated.UseSQLServerConnection.createBlob()instead.Create a new BLOB- Parameters:
connection- the database connection this blob is implemented ondata- the BLOB's data
-
-
Method Detail
-
toString
public final String toString()
Returns string representation of object
-
free
public void free() throws SQLException- Specified by:
freein interfaceBlob- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream() throws SQLException
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(long pos, long length) throws SQLException
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException
-
getBytes
public byte[] getBytes(long pos, int length) throws SQLException- Specified by:
getBytesin interfaceBlob- Throws:
SQLException
-
length
public long length() throws SQLException- Specified by:
lengthin interfaceBlob- Throws:
SQLException
-
position
public long position(Blob pattern, long start) throws SQLException
- Specified by:
positionin interfaceBlob- Throws:
SQLException
-
position
public long position(byte[] bPattern, long start) throws SQLException- Specified by:
positionin interfaceBlob- Throws:
SQLException
-
truncate
public void truncate(long len) throws SQLException- Specified by:
truncatein interfaceBlob- Throws:
SQLException
-
setBinaryStream
public OutputStream setBinaryStream(long pos) throws SQLException
- Specified by:
setBinaryStreamin interfaceBlob- Throws:
SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes) throws SQLException- Specified by:
setBytesin interfaceBlob- Throws:
SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException- Specified by:
setBytesin interfaceBlob- Throws:
SQLException
-
-