Package org.apache.commons.vfs2.util
Class RawMonitorInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.vfs2.util.RawMonitorInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
An InputStream that provides end-of-stream monitoring.
 
 This is the same as MonitorInputStream but without the buffering.
 
- Since:
- 2.5.0
- 
Field SummaryFields inherited from class java.io.FilterInputStreamin
- 
Constructor SummaryConstructorsConstructorDescriptionRawMonitorInputStream(InputStream inputStream) Constructs a MonitorInputStream from the passed InputStream.
- 
Method SummaryModifier and TypeMethodDescriptionintReturns 0 if the stream is at EOF, else the underlying inputStream will be queried.voidclose()Closes this input stream and releases any system resources associated with the stream.longgetCount()Gets the number of bytes read by this input stream.voidmark(int readLimit) protected 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.Methods inherited from class java.io.FilterInputStreammarkSupported, read, reset, skip
- 
Constructor Details- 
RawMonitorInputStreamConstructs a MonitorInputStream from the passed InputStream.- Parameters:
- inputStream- The input stream to wrap.
 
 
- 
- 
Method Details- 
availableReturns 0 if the stream is at EOF, else the underlying inputStream will be queried.- Overrides:
- availablein class- FilterInputStream
- Returns:
- The number of bytes that are available.
- Throws:
- IOException- if an error occurs.
 
- 
closeCloses this input stream and releases any system resources associated with the stream.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- FilterInputStream
- Throws:
- IOException- if an error occurs.
 
- 
getCountGets the number of bytes read by this input stream.- Returns:
- The number of bytes read by this input stream.
 
- 
mark- Overrides:
- markin class- FilterInputStream
 
- 
onCloseCalled after the stream has been closed. This implementation does nothing.- Throws:
- IOException- if an error occurs.
 
- 
readReads a character.- Overrides:
- readin class- FilterInputStream
- Returns:
- The character that was read as an integer.
- Throws:
- IOException- if an error occurs.
 
- 
readReads bytes from this input stream.- Overrides:
- readin class- FilterInputStream
- Parameters:
- 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.
- Returns:
- The number of bytes read.
- Throws:
- IOException- if an error occurs.
 
 
-