Package org.eclipse.net4j.util.io

# Class LimitedReader

java.lang.Object
java.io.Reader
org.eclipse.net4j.util.io.LimitedReader

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

public class LimitedReader extends Reader

Since:
  3.1
Author:
  Eike Stepper

## Field Summary

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

`lock`

## Constructor Summary

Constructors
Constructor
Description
`LimitedReader(Reader in, long length)`
`LimitedReader(Reader in, long length, boolean closeBackingReader)`

## Method Summary

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

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

`nullReader, read, read, ready, transferTo`

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

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

## Constructor Details

### LimitedReader

public LimitedReader(Reader in, long length, boolean closeBackingReader)

Since:
  3.20

### LimitedReader

public LimitedReader(Reader in, long length)

## 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`

### markSupported

public boolean markSupported()

Overrides:
  `markSupported` in class `Reader`

### mark

public void mark(int readlimit) 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`