com.thinkaurelius.titan.diskstorage

## Interface StaticBuffer

- All Superinterfaces:
    Comparable<StaticBuffer>
  All Known Subinterfaces:
    CachableStaticBuffer, Entry, ReadBuffer
  All Known Implementing Classes:
    ReadArrayBuffer, StaticArrayBuffer, StaticArrayEntry

      public interface StaticBuffer
      extends Comparable<StaticBuffer>

  A Buffer that only allows static access. This Buffer is immutable if any returned byte array or ByteBuffer is not mutated.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `StaticBuffer.Factory<T>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static StaticBuffer.Factory<byte[]>` | `ARRAY_FACTORY`
    `static StaticBuffer.Factory<ByteBuffer>` | `BB_FACTORY`
    `static StaticBuffer.Factory<StaticBuffer>` | `STATIC_FACTORY`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `as(StaticBuffer.Factory<T> factory)`
    `ByteBuffer` | `asByteBuffer()`
    `ReadBuffer` | `asReadBuffer()`
    `boolean` | `getBoolean(int position)`
    `byte` | `getByte(int position)`
    `byte[]` | `getBytes(int position, int length)`
    `char` | `getChar(int position)`
    `char[]` | `getChars(int position, int length)`
    `double` | `getDouble(int position)`
    `double[]` | `getDoubles(int position, int length)`
    `float` | `getFloat(int position)`
    `float[]` | `getFloats(int position, int length)`
    `int` | `getInt(int position)`
    `int[]` | `getInts(int position, int length)`
    `long` | `getLong(int position)`
    `long[]` | `getLongs(int position, int length)`
    `short` | `getShort(int position)`
    `short[]` | `getShorts(int position, int length)`
    `int` | `length()`
    `StaticBuffer` | `subrange(int position, int length)`
    `StaticBuffer` | `subrange(int position, int length, boolean invert)`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Field Detail

    - #### ARRAY_FACTORY

          static final StaticBuffer.Factory<byte[]> ARRAY_FACTORY

    - #### BB_FACTORY

          static final StaticBuffer.Factory<ByteBuffer> BB_FACTORY

    - #### STATIC_FACTORY

          static final StaticBuffer.Factory<StaticBuffer> STATIC_FACTORY

  - ### Method Detail

    - #### length

          int length()

    - #### getByte

          byte getByte(int position)

    - #### getBoolean

          boolean getBoolean(int position)

    - #### getShort

          short getShort(int position)

    - #### getInt

          int getInt(int position)

    - #### getLong

          long getLong(int position)

    - #### getChar

          char getChar(int position)

    - #### getFloat

          float getFloat(int position)

    - #### getDouble

          double getDouble(int position)

    - #### getBytes

          byte[] getBytes(int position,
                        int length)

    - #### getShorts

          short[] getShorts(int position,
                          int length)

    - #### getInts

          int[] getInts(int position,
                      int length)

    - #### getLongs

          long[] getLongs(int position,
                        int length)

    - #### getChars

          char[] getChars(int position,
                        int length)

    - #### getFloats

          float[] getFloats(int position,
                          int length)

    - #### getDoubles

          double[] getDoubles(int position,
                            int length)

    - #### subrange

          StaticBuffer subrange(int position,
                              int length)

    - #### subrange

          StaticBuffer subrange(int position,
                              int length,
                              boolean invert)

    - #### asReadBuffer

          ReadBuffer asReadBuffer()

    - #### as

          <T> T as(StaticBuffer.Factory<T> factory)

    - #### asByteBuffer

          ByteBuffer asByteBuffer()

Copyright © 2012–2014. All rights reserved.