com.maxmind.db

## Class BufferHolder

- java.lang.Object
- - com.maxmind.db.BufferHolder

-     final class BufferHolder
      extends Object

  Holds a ByteBuffer for MaxMind database access. Provides thread-safe access to database data either memory-mapped or loaded into memory.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BufferHolder(ByteBuffer buffer)`
    `BufferHolder(File database, Reader.FileMode mode)`
    `BufferHolder(InputStream stream)` Construct a ThreadBuffer from the provided URL.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) ByteBuffer` | `get()`

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

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

- - ### Constructor Detail

    - #### BufferHolder

          BufferHolder(ByteBuffer buffer)

    - #### BufferHolder

          BufferHolder(File database,
                       Reader.FileMode mode)
                throws IOException

      Throws:
        `IOException`

    - #### BufferHolder

          BufferHolder(InputStream stream)
                throws IOException

      Construct a ThreadBuffer from the provided URL.
      Parameters:
        `stream` - the source of my bytes.
      Throws:
        `IOException` - if unable to read from your source.
        `NullPointerException` - if you provide a NULL InputStream

  - ### Method Detail

    - #### get

          ByteBuffer get()