Package org.apache.commons.vfs.util
Class MonitorInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
org.apache.commons.vfs.util.MonitorInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
An InputStream that provides buffering and end-of-stream monitoring.
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
Field Summary
Fields inherited from class java.io.BufferedInputStream
buf, marklimit, markpos, posFields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this input stream and releases any system resources associated with the stream.longgetCount()Get the nuber of bytes read by this input streamprotected voidonClose()Called after the stream has been closed.intread()Reads a character.intread(byte[] buffer, int offset, int length) Reads bytes from this input stream.error occurs.Methods inherited from class java.io.BufferedInputStream
available, mark, markSupported, reset, skip, transferToMethods inherited from class java.io.FilterInputStream
readMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes
-
Constructor Details
-
MonitorInputStream
-
-
Method Details
-
read
Reads a character.- Overrides:
readin classBufferedInputStream- Throws:
IOException
-
read
Reads bytes from this input stream.error occurs.- Overrides:
readin classBufferedInputStream- Throws:
IOException
-
close
Closes this input stream and releases any system resources associated with the stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classBufferedInputStream- Throws:
IOException
-
onClose
Called after the stream has been closed. This implementation does nothing.- Throws:
IOException
-
getCount
public long getCount()Get the nuber of bytes read by this input stream
-