Package com.twelvemonkeys.io
Class SubStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.twelvemonkeys.io.SubStream
- All Implemented Interfaces:
Closeable,AutoCloseable
An
InputStream reading up to a specified number of bytes from an
underlying stream.- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/SubStream.java#2 $
- Author:
- Harald Kuhr
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionSubStream(InputStream pStream, long pLength) Creates aSubStreamof the givenpStream. -
Method Summary
Methods inherited from class java.io.FilterInputStream
markSupportedMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
SubStream
Creates aSubStreamof the givenpStream.- Parameters:
pStream- the underlying input streampLength- maximum number of bytes to read drom this stream
-
-
Method Details
-
close
Marks this stream as closed. This implementation does not close the underlying stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
mark
public void mark(int pReadLimit) - Overrides:
markin classFilterInputStream
-
reset
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-