org.openmdx.base.stream.rmi.cci
Class BinarySource_1InputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.openmdx.base.stream.rmi.cci.BinarySource_1InputStream
All Implemented Interfaces:
Closeable, Source_1_0

public class BinarySource_1InputStream
extends InputStream
implements Source_1_0

Streams: Binary Source InputStream


Field Summary
protected  ExecutionContext callbackContext
          Callback Context
protected static int DEFAULT_CAPACITY
          The stream's default capacity
protected  BinarySource_1_0 in
           
 
Constructor Summary
BinarySource_1InputStream(BinarySource_1_0 source, ExecutionContext callbackContext)
          Constructor
BinarySource_1InputStream(BinarySource_1_0 source, int capacity, ExecutionContext callbackContext)
          Constructor
 
Method Summary
 void close()
          Closes this iterator and releases any system resources associated with it.
protected  boolean isOpen()
           
 long length()
          Get the stream's length
 int read()
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected BinarySource_1_0 in

DEFAULT_CAPACITY

protected static int DEFAULT_CAPACITY
The stream's default capacity


callbackContext

protected final ExecutionContext callbackContext
Callback Context

Constructor Detail

BinarySource_1InputStream

public BinarySource_1InputStream(BinarySource_1_0 source,
                                 int capacity,
                                 ExecutionContext callbackContext)
Constructor

Parameters:
source -
capacity -
callbackContext - The execution context for callbacks

BinarySource_1InputStream

public BinarySource_1InputStream(BinarySource_1_0 source,
                                 ExecutionContext callbackContext)
Constructor

Parameters:
source -
callbackContext - The execution context for callbacks
Method Detail

isOpen

protected boolean isOpen()

length

public long length()
            throws IOException
Get the stream's length

Specified by:
length in interface Source_1_0
Returns:
the length of the stream or -1 if it is unknown.
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: Source_1_0
Closes this iterator and releases any system resources associated with it.

No read() operation must be invoked after close().

Specified by:
close in interface Closeable
Specified by:
close in interface Source_1_0
Overrides:
close in class InputStream
Throws:
IOException - if an I/O error occurs.

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.