com.fasterxml.jackson.databind.util

## Class ByteBufferBackedInputStream

- java.lang.Object
- - java.io.InputStream
  - - com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class ByteBufferBackedInputStream
      extends InputStream

  Simple `InputStream` implementation that exposes currently available content of a `ByteBuffer`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ByteBuffer` | `_b`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ByteBufferBackedInputStream(ByteBuffer buf)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `available()`
    `int` | `read()`
    `int` | `read(byte[] bytes, int off, int len)`

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

      `close, mark, markSupported, read, reset, skip`

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

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

- - ### Field Detail

    - #### _b

          protected final ByteBuffer _b

  - ### Constructor Detail

    - #### ByteBufferBackedInputStream

          public ByteBufferBackedInputStream(ByteBuffer buf)

  - ### Method Detail

    - #### available

          public int available()

      Overrides:
        `available` 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`

Copyright © 2014–2015 FasterXML. All rights reserved.