Entering content frame

Function documentation sqlj.runtime.BinaryStream Locate the document in its SAP Library structure

sqlj.runtime.BinaryStream extends StreamWrapper

BinaryStream ( sqlj.runtime.BinaryStream) is a class derived from java.io.InputStream. The octets comprising a BinaryStream object are not interpreted as characters. In order to process an InputStream object as an input argument to an executable SQL operation, an SQLJ implementation has to know both its length and the way to interpret its octets.

Note

A BinaryStream object can only be used once as an in parameter of a SQL operation, because the operation will consume the stream.

Constructors

public BinaryStream (InputStream in)

Creates a new BinaryStream object using the given InputStream object in. The length of the BinaryStream object is uninitialized and must be set with set the setLength() method before use of a BinaryStream object as an IN (or INOUT) parameter in an invocation of an SQL operation..

public BinaryStream (InputStream in, int length)

Creates a new BinaryStream object using the given InputStream object. The length of the BinaryStream object is initialized to the value length.

Methods

public InputStream getInputStream ()

Returns the InputStream object that is being wrapped by this BinaryStream object.

public int getLength()

Returns the length in bytes of the wrapped InputStream object, as specified during construction or in the last call to setLength(). If the length is uninitialized, -1 is returned.

public void setLength (int length)

Sets the length Java field of the wrapped stream to be the value length. This does not affect the wrapped InputStream object, but will affect the number of octets read from it when it is passed as an argument to an invocation of an SQL operation.

 

Leaving content frame