|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--java.io.FilterInputStream
Abstract class representing a filtered input stream of bytes. This class is the basis for enhancing input stream functionality. It allows multiple input stream filters to be chained together, each providing additional functionality.
Field Summary | |
protected InputStream |
in
The actual input stream. |
Constructor Summary | |
protected |
FilterInputStream(InputStream in)
Creates an input stream filter. |
Method Summary | |
int |
available()
Returns the number of bytes that can be read without blocking. |
void |
close()
Closes the input stream. |
void |
mark(int readlimit)
Marks the current position in the input stream. |
boolean |
markSupported()
Returns true if this stream type supports mark/reset. |
int |
read()
Reads a byte. |
int |
read(byte[] b)
Reads into an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Reads into an array of bytes. |
void |
reset()
Repositions the stream to the last marked position. |
long |
skip(long n)
Skips bytes of input. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected InputStream in
Constructor Detail |
protected FilterInputStream(InputStream in)
in
- the input streamMethod Detail |
public int read() throws IOException
read
in class InputStream
IOException
- If an I/O error has occurred.public int read(byte[] b) throws IOException
read
in class InputStream
b
- the buffer into which the data is read
IOException
- If an I/O error has occurred.public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
b
- the buffer into which the data is readoff
- the start offset of the datalen
- the maximum number of bytes read
IOException
- If an I/O error has occurred.public long skip(long n) throws IOException
skip
in class InputStream
n
- bytes to be skipped
IOException
- If an I/O error has occurred.public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in class InputStream
IOException
- If an I/O error has occurred.public void mark(int readlimit)
mark
in class InputStream
readlimit
- the maximum limit of bytes allowed tobe read before the
mark position becomes invalid.public void reset() throws IOException
reset
in class InputStream
IOException
- If the stream has not been marked or
if the mark has been invalidated.public boolean markSupported()
markSupported
in class InputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |