org.apache.commons.vfs2.util
public class MonitorInputStream extends java.io.BufferedInputStream
Constructor and Description |
---|
MonitorInputStream(java.io.InputStream in) |
Modifier and Type | Method and Description |
---|---|
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.
|
public int available() throws java.io.IOException
available
in class java.io.BufferedInputStream
java.io.IOException
- if an error occurs.public int read() throws java.io.IOException
read
in class java.io.BufferedInputStream
java.io.IOException
- if an error occurs.public int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in class java.io.BufferedInputStream
buffer
- 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.java.io.IOException
- if an error occurs.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.BufferedInputStream
java.io.IOException
- if an error occurs.protected void onClose() throws java.io.IOException
java.io.IOException
- if an error occurs.public long getCount()
Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.