sqlj.runtime.CharacterStream class

The sqlj.runtime.CharacterStream class is for an input stream of character data with a specified length.

The sqlj.runtime.CharacterStream class is derived from the java.io.Reader class, and extends the java.io.FilterReader class. SQLJ interprets the bytes in an sqlj.runtime.CharacterStream object are interpreted as Unicode data. A Reader object with Unicode data needs to be passed as a sqlj.runtime.CharacterStream object.

Constructors

CharacterStream(InputStream)
Format:
public CharacterStream(java.io.Reader input-stream)

Creates a character java.io.Reader object with an unspecified length.

Parameters:
input-stream
The Reader object that SQLJ interprets as an CharacterStream object.
CharacterStream(InputStream, int)
Format:
public CharacterStream(java.io.Reader input-stream, int length)

Creates a character java.io.Reader object with a specified length.

Parameters:
input-stream
The Reader object that SQLJ interprets as an CharacterStream object.
length
The length of the Reader object that SQLJ interprets as an CharacterStream object.

Methods

getReader
Format:
public Reader getReader()

Returns the underlying Reader object that is wrapped by the CharacterStream object.

getLength
Format:
public void getLength()

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

setLength
Format:
public void setLength (int length)

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

Parameters:
length
The number of characters that are read from the Reader object.