sqlj.runtime
Class UnicodeStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--sqlj.runtime.StreamWrapper
                    |
                    +--sqlj.runtime.UnicodeStream

public class UnicodeStream
extends StreamWrapper

An InputStream-derived class whose bytes should be interpreted as Unicode. When passing an InputStream as an input parameter to an executable sql operation, both the length of the InputStream and the way to interpret its bytes must be specified. Therefore, an InputStream cannot be passed directly, but rather must be an instance of AsciiStream, BinaryStream or UnicodeStream.

See Also:
AsciiStream, BinaryStream

Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
UnicodeStream(java.io.InputStream in)
          Creates a Unicode-valued input stream with an uninitialized length.
UnicodeStream(java.io.InputStream in, int length)
          Creates a Unicode-valued input stream of given length.
 
Methods inherited from class sqlj.runtime.StreamWrapper
getInputStream, getLength, setLength
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnicodeStream

public UnicodeStream(java.io.InputStream in)
Creates a Unicode-valued input stream with an uninitialized length.

Note: the length attribute must be set via a call to setLength() before use of an UnicodeStream as an input (or in-out) parameter to a executable sql operation.

Parameters:
in - the InputStream to interpret as a UnicodeStream.

UnicodeStream

public UnicodeStream(java.io.InputStream in,
                     int length)
Creates a Unicode-valued input stream of given length.
Parameters:
in - the InputStream to interpret as an UnicodeStream.
length - the length in bytes of the UnicodeStream