|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
org.apache.commons.vfs2.util.MonitorInputStream
public class MonitorInputStream
An InputStream that provides buffering and end-of-stream monitoring.
| Field Summary |
|---|
| Fields inherited from class java.io.BufferedInputStream |
|---|
buf, marklimit, markpos, pos |
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
MonitorInputStream(InputStream in)
|
|
| Method Summary | |
|---|---|
int |
available()
Returns 0 if the stream is at eof, else the underlaying inputStream will be queried. |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
long |
getCount()
Get the nuber of bytes read by this input stream. |
protected void |
onClose()
Called after the stream has been closed. |
int |
read()
Reads a character. |
int |
read(byte[] buffer,
int offset,
int length)
Reads bytes from this input stream. |
| Methods inherited from class java.io.BufferedInputStream |
|---|
mark, markSupported, reset, skip |
| Methods inherited from class java.io.FilterInputStream |
|---|
read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MonitorInputStream(InputStream in)
| Method Detail |
|---|
public int available()
throws IOException
available in class BufferedInputStreamIOException - if an error occurs.
public int read()
throws IOException
read in class BufferedInputStreamIOException - if an error occurs.
public int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class BufferedInputStreambuffer - A byte array in which to place the characters read.offset - The offset at which to start reading.length - The maximum number of bytes to read.
IOException - if an error occurs.
public void close()
throws IOException
close in interface Closeableclose in class BufferedInputStreamIOException - if an error occurs.
protected void onClose()
throws IOException
IOException - if an error occurs.public long getCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||