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 aSubStream
of the givenpStream
. -
Method Summary
Methods inherited from class java.io.FilterInputStream
markSupported
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
SubStream
Creates aSubStream
of 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
mark
public void mark(int pReadLimit) - Overrides:
mark
in classFilterInputStream
-
reset
- Overrides:
reset
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-