Package org.restlet.engine.io
Class RangeInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.restlet.engine.io.RangeInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Filters an input stream to expose only a given range.
- Author:
- Jerome Louvel
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionRangeInputStream(InputStream in, long totalSize, Range range) Constructs a stream exposing only a range of a given source stream. -
Method Summary
Methods inherited from class java.io.FilterInputStream
close, markSupported, read, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
RangeInputStream
Constructs a stream exposing only a range of a given source stream.- Parameters:
in- The source input stream.totalSize- The total size of the source stream.range- The range to satisfy.
-
-
Method Details
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classFilterInputStream
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-