Package org.h2.store
Class RangeInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.h2.store.RangeInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Input stream that reads only a specified range from the source stream.
-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionRangeInputStream
(InputStream in, long offset, long limit) Creates new instance of range input stream. -
Method Summary
Methods inherited from class java.io.FilterInputStream
read
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
limit
private long limit
-
-
Constructor Details
-
RangeInputStream
Creates new instance of range input stream.- Parameters:
in
- source streamoffset
- offset of the rangelimit
- length of the range- Throws:
IOException
- on I/O exception during seeking to the specified offset
-
-
Method Details
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
mark
in classFilterInputStream
-
reset
- Overrides:
reset
in classFilterInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classFilterInputStream
-