de.esprit.appsuite.nio.binary

## Class AbstractByteBufferStore

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.nio.binary.AbstractByteBufferStore

- All Implemented Interfaces:
    Dumpable

      public abstract class AbstractByteBufferStore
      extends DumpableObject

  This is a container for any kind of `ByteBuffer`s.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractByteBufferStore()`
    `AbstractByteBufferStore(java.nio.ByteOrder byteOrder)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.nio.ByteBuffer` | `addBuffer(java.nio.ByteBuffer buffer)`
    `protected java.nio.ByteBuffer` | `allocateBuffer(BinaryDataType dataType)`
    `protected java.nio.ByteBuffer` | `allocateBuffer(BinaryDataType dataType, int count)`
    `protected java.nio.ByteBuffer` | `allocateBuffer(int bytes)`
    `protected java.nio.DoubleBuffer` | `asDoubleBuffer(java.nio.ByteBuffer bb)` Get buffer as `DoubleBuffer` having the same `ByteOrder` as the store itself.
    `protected java.nio.FloatBuffer` | `asFloatBuffer(java.nio.ByteBuffer bb)` Get buffer as `FloatBuffer` having the same `ByteOrder` as the store itself.
    `protected java.nio.IntBuffer` | `asIntBuffer(java.nio.ByteBuffer bb)` Get buffer as `IntBuffer` having the same `ByteOrder` as the store itself.
    `protected java.nio.DoubleBuffer` | `createDoubleBuffer(int numDoubles)`
    `protected java.nio.FloatBuffer` | `createFloatBuffer(int numFloats)`
    `protected java.nio.IntBuffer` | `createIntBuffer(int numInts)`
    `protected java.nio.ByteBuffer` | `createWrappedByteBuffer(java.nio.ByteBuffer baseBuffer, int offset, int count)`
    `protected java.nio.IntBuffer` | `createWrappedIntBuffer(java.nio.ByteBuffer baseBuffer, int offset, int count)`
    `java.util.List<java.nio.ByteBuffer>` | `getBufferList()`
    `java.nio.ByteOrder` | `getByteOrder()`
    `long` | `getSize()`
    `protected java.lang.String` | `getString(java.nio.ByteBuffer buffer)` Parse buffer byte by byte until \0 is detected or end of data in buffer.
    `void` | `setByteOrder(java.nio.ByteOrder byteOrder)`
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString`

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

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

- - ### Constructor Detail

    - #### AbstractByteBufferStore

          public AbstractByteBufferStore()

    - #### AbstractByteBufferStore

          public AbstractByteBufferStore(java.nio.ByteOrder byteOrder)

  - ### Method Detail

    - #### getBufferList

          public final java.util.List<java.nio.ByteBuffer> getBufferList()

    - #### getSize

          public final long getSize()

    - #### getByteOrder

          public final java.nio.ByteOrder getByteOrder()

    - #### setByteOrder

          public final void setByteOrder(java.nio.ByteOrder byteOrder)

    - #### allocateBuffer

          protected final java.nio.ByteBuffer allocateBuffer(BinaryDataType dataType)

    - #### allocateBuffer

          protected final java.nio.ByteBuffer allocateBuffer(BinaryDataType dataType,
                                           int count)

    - #### allocateBuffer

          protected final java.nio.ByteBuffer allocateBuffer(int bytes)

    - #### addBuffer

          protected final java.nio.ByteBuffer addBuffer(java.nio.ByteBuffer buffer)

    - #### createIntBuffer

          protected final java.nio.IntBuffer createIntBuffer(int numInts)

    - #### createFloatBuffer

          protected final java.nio.FloatBuffer createFloatBuffer(int numFloats)

    - #### createDoubleBuffer

          protected final java.nio.DoubleBuffer createDoubleBuffer(int numDoubles)

    - #### createWrappedIntBuffer

          protected final java.nio.IntBuffer createWrappedIntBuffer(java.nio.ByteBuffer baseBuffer,
                                                  int offset,
                                                  int count)

    - #### createWrappedByteBuffer

          protected final java.nio.ByteBuffer createWrappedByteBuffer(java.nio.ByteBuffer baseBuffer,
                                                    int offset,
                                                    int count)

    - #### asIntBuffer

          protected final java.nio.IntBuffer asIntBuffer(java.nio.ByteBuffer bb)

      Get buffer as `IntBuffer` having the same `ByteOrder` as the store itself.

    - #### asFloatBuffer

          protected final java.nio.FloatBuffer asFloatBuffer(java.nio.ByteBuffer bb)

      Get buffer as `FloatBuffer` having the same `ByteOrder` as the store itself.

    - #### asDoubleBuffer

          protected final java.nio.DoubleBuffer asDoubleBuffer(java.nio.ByteBuffer bb)

      Get buffer as `DoubleBuffer` having the same `ByteOrder` as the store itself.

    - #### getString

          protected final java.lang.String getString(java.nio.ByteBuffer buffer)

      Parse buffer byte by byte until \0 is detected or end of data in buffer.
      Returns:
        detected String

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.