Package org.h2.store

# Class RangeReader

java.lang.Object
java.io.Reader
org.h2.store.RangeReader

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `Readable`

public final class RangeReader extends Reader
Reader that reads only a specified range from the source reader.

## Field Summary

### Fields inherited from class java.io.Reader

`lock`

## Constructor Summary

Constructors
Constructor
Description
`RangeReader(Reader r, long offset, long limit)`
Creates new instance of range reader.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`void`
`mark(int readAheadLimit)`
`boolean`
`markSupported()`
`int`
`read()`
`int`
`read(char[] cbuf, int off, int len)`
`boolean`
`ready()`
`void`
`reset()`
`long`
`skip(long n)`

### Methods inherited from class java.io.Reader

`nullReader, read, read, transferTo`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RangeReader

public RangeReader(Reader r, long offset, long limit) throws IOException
Creates new instance of range reader.

Parameters:
  `r` - source reader
  `offset` - offset of the range
  `limit` - length of the range
Throws:
  `IOException` - on I/O exception during seeking to the specified offset

## Method Details

### read

public int read() throws IOException

Overrides:
  `read` in class `Reader`
Throws:
  `IOException`

### read

public int read(char[] cbuf, int off, int len) throws IOException

Specified by:
  `read` in class `Reader`
Throws:
  `IOException`

### skip

public long skip(long n) throws IOException

Overrides:
  `skip` in class `Reader`
Throws:
  `IOException`

### ready

public boolean ready() throws IOException

Overrides:
  `ready` in class `Reader`
Throws:
  `IOException`

### markSupported

public boolean markSupported()

Overrides:
  `markSupported` in class `Reader`

### mark

public void mark(int readAheadLimit) throws IOException

Overrides:
  `mark` in class `Reader`
Throws:
  `IOException`

### reset

public void reset() throws IOException

Overrides:
  `reset` in class `Reader`
Throws:
  `IOException`

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in class `Reader`
Throws:
  `IOException`