# Class ByteBufferInputStream

java.lang.Object
java.io.InputStream
org.fressian.impl.ByteBufferInputStream

All Implemented Interfaces:
  `Closeable, AutoCloseable`

public class ByteBufferInputStream extends InputStream
`InputStream` over a `ByteBuffer`. Duplicates the buffer on construction in order to maintain its own cursor.

See Also:
  - `InputStream`
  - `ByteBuffer`

## Constructor Summary

Constructors
Constructor
Description
`ByteBufferInputStream(ByteBuffer buf)`

## Method Summary

Modifier and Type
Method
Description
`int`
`available()`
`void`
`mark(int readlimit)`
`boolean`
`markSupported()`
`int`
`read()`
`int`
`read(byte[] bytes, int off, int len)`
`void`
`reset()`
`long`
`skip(long l)`

### Methods inherited from class InputStream

`close, nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo`

### Methods inherited from class Object

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

## Constructor Details

### ByteBufferInputStream

public ByteBufferInputStream(ByteBuffer buf)

## Method Details

### reset

public void reset() throws IOException

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

### mark

public void mark(int readlimit)

Overrides:
  `mark` in class `InputStream`

### markSupported

public boolean markSupported()

Overrides:
  `markSupported` in class `InputStream`

### read

public int read() throws IOException

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

### read

public int read(byte[] bytes, int off, int len) throws IOException

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

### skip

public long skip(long l) throws IOException

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

### available

public int available() throws IOException

Overrides:
  `available` in class `InputStream`
Throws:
  `IOException`