Package org.h2.store
Class RangeReader
java.lang.Object
java.io.Reader
org.h2.store.RangeReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
Reader that reads only a specified range from the source reader.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRangeReader
(Reader r, long offset, long limit) Creates new instance of range reader. -
Method Summary
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Field Details
-
r
-
limit
private long limit
-
-
Constructor Details
-
RangeReader
Creates new instance of range reader.- Parameters:
r
- source readeroffset
- 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 classReader
- Throws:
IOException
-
read
- Specified by:
read
in classReader
- Throws:
IOException
-
skip
- Overrides:
skip
in classReader
- Throws:
IOException
-
ready
- Overrides:
ready
in classReader
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classReader
-
mark
- Overrides:
mark
in classReader
- Throws:
IOException
-
reset
- Overrides:
reset
in classReader
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-