Package com.norconex.commons.lang.io

# Class ByteBufferInputStream

java.lang.Object
java.io.InputStream
com.norconex.commons.lang.io.ByteBufferInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class ByteBufferInputStream extends InputStream
Wraps a `ByteBuffer` in an `InputStream`.

Since:
  1.5

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ByteBufferInputStream(ByteBuffer buf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `read()`
  `int`
  `read(byte[] bytes, int off, int len)`

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

  `available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo`

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

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

- ## Constructor Details

  - ### ByteBufferInputStream

    public ByteBufferInputStream(ByteBuffer buf)

- ## Method Details

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