sqlj.runtime
Class BinaryStream

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

public class BinaryStream
extends StreamWrapper

An InputStream-derived class whose bytes should be interpreted as binary. 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, UnicodeStream

Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
BinaryStream(java.io.InputStream in)
          Creates a Binary-valued input stream with an uninitialized length.
BinaryStream(java.io.InputStream in, int length)
          Creates a Binary-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

BinaryStream

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

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

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

BinaryStream

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