fi.iki.hsivonen.io
Class ObservableInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by fi.iki.hsivonen.io.ObservableInputStream
All Implemented Interfaces:
Closeable

public class ObservableInputStream
extends InputStream

Version:
$Id: ObservableInputStream.java,v 1.2 2005/07/24 07:35:24 hsivonen Exp $
Author:
hsivonen

Field Summary
private  InputStream delegate
           
private  StreamObserver observer
           
 
Constructor Summary
ObservableInputStream(InputStream delegate, StreamObserver obs)
           
 
Method Summary
 int available()
           
 void close()
           
protected  void finalize()
           
 void mark(int arg0)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] arg0)
           
 int read(byte[] arg0, int arg1, int arg2)
           
 void reset()
           
 long skip(long arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

observer

private StreamObserver observer

delegate

private InputStream delegate
Constructor Detail

ObservableInputStream

public ObservableInputStream(InputStream delegate,
                             StreamObserver obs)
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException
See Also:
InputStream.available()

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException
See Also:
InputStream.close()

mark

public void mark(int arg0)
Overrides:
mark in class InputStream
See Also:
InputStream.mark(int)

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream
See Also:
InputStream.markSupported()

read

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

read

public int read(byte[] arg0)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read(byte[])

read

public int read(byte[] arg0,
                int arg1,
                int arg2)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read(byte[], int, int)

reset

public void reset()
           throws IOException
Overrides:
reset in class InputStream
Throws:
IOException
See Also:
InputStream.reset()

skip

public long skip(long arg0)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException
See Also:
InputStream.skip(long)

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable
See Also:
Object.finalize()