er.woinstaller.io
Class BoundedInputStream
java.lang.Object
java.io.InputStream
er.woinstaller.io.BoundedInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class BoundedInputStream
- extends java.io.InputStream
InputStream that delegates requests to the underlying
RandomAccessFile, making sure that only bytes from a certain
range can be read.
Constructor Summary |
BoundedInputStream(java.io.InputStream inputStream,
long start,
long remaining)
|
Method Summary |
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
Methods inherited from class java.io.InputStream |
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoundedInputStream
public BoundedInputStream(java.io.InputStream inputStream,
long start,
long remaining)
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
Copyright © 2002 – 2007 Project Wonder.