| title | getBytes Method (SQLServerBlob) |
|---|---|
| description | getBytes Method (SQLServerBlob) |
| author | David-Engel |
| ms.author | davidengel |
| ms.date | 01/19/2017 |
| ms.service | sql |
| ms.subservice | connectivity |
| ms.topic | reference |
| apilocation | sqljdbc.jar |
| apiname | SQLServerBlob.getBytes |
| apitype | Assembly |
[!INCLUDEDriver_JDBC_Download]
Gets the BLOB data as an array of bytes.
public byte[] getBytes(long pos,
int length)
pos
The starting position, starting at 1 (not 0).
length
The length of the data to get.
A byte array containing the requested data.
This getBytes method is specified by the getBytes method in the java.sql.Blob interface.
If you have a null or zero length BLOB, and try to get exactly zero bytes at position 1, an empty byte array is returned (byte array of length 0).
If you have a null or zero length BLOB, and try to get any length of bytes at a position other than 1, a position exception will be thrown.
SQLServerBlob Methods
SQLServerBlob Members
SQLServerBlob Class