| java.lang.Object java.io.InputStream com.quadcap.io.LimitedInputStream
LimitedInputStream | public class LimitedInputStream extends InputStream (Code) | | This class implements a sort of 'head' operation, creating a new
input stream as a filter stream on top of an existing stream, returning
only the first "N" bytes.
author: Stan Bailes |
Constructor Summary | |
public | LimitedInputStream(InputStream in, int limit) Construct a new LimitedInputStream, attached to the specified
input stream and with the specified limit. |
Method Summary | |
public int | read() Read a byte from this stream, returning -1 if the underlying
stream returns EOF, or if we've reached our limit. |
LimitedInputStream | public LimitedInputStream(InputStream in, int limit)(Code) | | Construct a new LimitedInputStream, attached to the specified
input stream and with the specified limit.
Parameters: in - the input stream Parameters: limit - the number of bytes to read |
read | public int read() throws IOException(Code) | | Read a byte from this stream, returning -1 if the underlying
stream returns EOF, or if we've reached our limit.
exception: IOException - may be thrown |
|
|