Package com.microsoft.sqlserver.jdbc
Class SQLServerBlob
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.SQLServerBlob
-
- All Implemented Interfaces:
java.io.Serializable
,java.sql.Blob
public final class SQLServerBlob extends java.lang.Object implements java.sql.Blob, java.io.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 void
free()
java.io.InputStream
getBinaryStream()
java.io.InputStream
getBinaryStream(long pos, long length)
byte[]
getBytes(long pos, int length)
long
length()
long
position(byte[] bPattern, long start)
long
position(java.sql.Blob pattern, long start)
java.io.OutputStream
setBinaryStream(long pos)
int
setBytes(long pos, byte[] bytes)
int
setBytes(long pos, byte[] bytes, int offset, int len)
java.lang.String
toString()
void
truncate(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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
free
public void free() throws java.sql.SQLException
- Specified by:
free
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
getBinaryStream
public java.io.InputStream getBinaryStream() throws java.sql.SQLException
- Specified by:
getBinaryStream
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
getBinaryStream
public java.io.InputStream getBinaryStream(long pos, long length) throws java.sql.SQLException
- Specified by:
getBinaryStream
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
getBytes
public byte[] getBytes(long pos, int length) throws java.sql.SQLException
- Specified by:
getBytes
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
length
public long length() throws java.sql.SQLException
- Specified by:
length
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
position
public long position(java.sql.Blob pattern, long start) throws java.sql.SQLException
- Specified by:
position
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
position
public long position(byte[] bPattern, long start) throws java.sql.SQLException
- Specified by:
position
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
truncate
public void truncate(long len) throws java.sql.SQLException
- Specified by:
truncate
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
setBinaryStream
public java.io.OutputStream setBinaryStream(long pos) throws java.sql.SQLException
- Specified by:
setBinaryStream
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes) throws java.sql.SQLException
- Specified by:
setBytes
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes, int offset, int len) throws java.sql.SQLException
- Specified by:
setBytes
in interfacejava.sql.Blob
- Throws:
java.sql.SQLException
-
-