sqlj.runtime.StreamWrapper class

The sqlj.runtime.StreamWrapper class wraps a java.io.InputStream instance and extends the java.io.InputStream class.

The sqlj.runtime.AsciiStream, sqlj.runtime.BinaryStream, and sqlj.runtime.UnicodeStream classes extend sqlj.runtime.StreamWrapper. sqlj.runtime.StreamWrapper supports methods for specifying the length of sqlj.runtime.AsciiStream, sqlj.runtime.BinaryStream, and sqlj.runtime.UnicodeStream objects.

Constructors

StreamWrapper(InputStream)
Format:
protected StreamWrapper(InputStream input-stream)

Creates an sqlj.runtime.StreamWrapper object with an unspecified length.

Parameters:
input-stream
The InputStream object that the sqlj.runtime.StreamWrapper object wraps.
StreamWrapper(InputStream, int)
Format:
protected StreamWrapper(java.io.InputStream input-stream, int length)

Creates an sqlj.runtime.StreamWrapper object with a specified length.

Parameters:
input-stream
The InputStream object that the sqlj.runtime.StreamWrapper object wraps.
length
The length of the InputStream object in bytes.

Methods

getInputStream
Format:
public InputStream getInputStream()

Returns the underlying InputStream object that is wrapped by the StreamWrapper object.

getLength
Format:
public void getLength()

Returns the length in bytes of the wrapped InputStream object, as specified by the constructor or in the last call to setLength.

setLength
Format:
public void setLength (int length)

Sets the number of bytes that are read from the wrapped InputStream object when the object is passed as an input argument to an SQL operation.

Parameters:
length
The number of bytes that are read from the wrapped InputStream object.