Compartir a través de


getBinaryStream Method (java.lang.String)

Retrieves the value of the designated column name in the current row of this SQLServerResultSet object as a binary stream of uninterpreted bytes.

public java.io.InputStream getBinaryStream(java.lang.String columnName)

Parámetros

columnName

A String that contains the column name.

Valor devuelto

An InputStream object.

Excepciones

SQLServerException

Observaciones

This getBinaryStream method is specified by the getBinaryStream method in the java.sql.ResultSet interface.

This method can be used only with SQL Server data types of binary, varbinary, varbinary(max), and image. Trying to use it with other data types will cause an exception to be thrown.

After this method gets the value as a stream, the value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Nota

All the data in the returned stream must be read before getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream can return 0 when the method InputStream.available is called, whether there is data available or not.

Vea también

Referencia

SQLServerResultSet Class

Conceptos

getBinaryStream Method (SQLServerResultSet)
SQLServerResultSet Methods
SQLServerResultSet Members