fi.iki.hsivonen.io
Class ObservableInputStream
java.lang.Object
java.io.InputStream
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
observer
private StreamObserver observer
delegate
private InputStream delegate
ObservableInputStream
public ObservableInputStream(InputStream delegate,
StreamObserver obs)
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()