sqlj.runtime
Class CharacterStream
java.lang.Object
|
+--java.io.Reader
|
+--java.io.FilterReader
|
+--sqlj.runtime.CharacterStream
- public class CharacterStream
- extends java.io.FilterReader
A class derived from java.io.Reader whose instances contain Unicode data.
If passing an instance of this class as an input argument to an executable
SQL operation, the length of the Reader object must be specified. Therefore,
an instance of the Reader class cannot be passed directly, but rather shall
be an instance of CharacterStream.
- Since:
- ISO/IEC 9075-10:2000
| Fields inherited from class java.io.FilterReader |
in |
| Fields inherited from class java.io.Reader |
lock |
|
Constructor Summary |
CharacterStream(java.io.Reader in)
Creates an instance of CharacterStream with an uninitialized length.
|
CharacterStream(java.io.Reader in,
int length)
Creates an instance of CharacterStream of given length. |
|
Method Summary |
int |
getLength()
Returns the length in characters of the wrapped Reader object, as
specified during construction or in the last call to setLength(). |
java.io.Reader |
getReader()
Returns the underlying Reader object wrapped by the CharacterStream
object. |
void |
setLength(int length)
Sets the length Java field of the wrapped Reader object to be the passed
value. |
| Methods inherited from class java.io.FilterReader |
close, mark, markSupported, read, read, ready, reset, skip |
| Methods inherited from class java.io.Reader |
read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CharacterStream
public CharacterStream(java.io.Reader in)
- Creates an instance of CharacterStream with an uninitialized length.
Note: The length Java field shall be set via a call to setLength() before
use of a CharacterStream object as an input (or inout) parameter to a
executable SQL operation.
- Parameters:
in - the Reader to interpret as a CharacterStream
CharacterStream
public CharacterStream(java.io.Reader in,
int length)
- Creates an instance of CharacterStream of given length.
- Parameters:
in - the Reader object to interpret as a CharacterStream objectlength - the length in characters of the CharacterStream object
getReader
public java.io.Reader getReader()
- Returns the underlying Reader object wrapped by the CharacterStream
object.
- Returns:
- the underlying Reader object that is being wrapped
getLength
public int getLength()
- Returns the length in characters of the wrapped Reader object, as
specified during construction or in the last call to setLength().
- Returns:
- the length in characters of the Reader object
setLength
public void setLength(int length)
- Sets the length Java field of the wrapped Reader object to be the passed
value. This does not affect the wrapped Reader object, but will affect the
number of characters read from it when it is passed as an input argument to
an executable SQL operation.
- Parameters:
length - the new length of the Reader object in characters