com.thinkaurelius.titan.diskstorage.util

## Class BufferUtil

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.util.BufferUtil

-     public class BufferUtil
      extends Object

  Utility methods for dealing with `ByteBuffer`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `intSize`
    `static int` | `longSize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BufferUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static StaticBuffer` | `emptyBuffer()`
    `static boolean` | `equals(StaticBuffer b1, ByteBuffer b2)` Thread safe equals method for StaticBuffer - ByteBuffer equality comparison
    `static StaticBuffer` | `fillBuffer(int len, byte value)`
    `static StaticBuffer` | `getIntBuffer(int id)`
    `static StaticBuffer` | `getIntBuffer(int[] ids)`
    `static StaticBuffer` | `getLongBuffer(long id)`
    `static StaticBuffer` | `nextBiggerBuffer(StaticBuffer buffer)`
    `static StaticBuffer` | `nextBiggerBufferAllowOverflow(StaticBuffer buffer)`
    `static StaticBuffer` | `oneBuffer(int len)`
    `static StaticBuffer` | `readBuffer(ScanBuffer in)`
    `static Entry` | `readEntry(ReadBuffer in, Serializer serializer)`
    `static void` | `writeBuffer(DataOutput out, StaticBuffer buffer)`
    `static void` | `writeEntry(DataOutput out, Entry entry)`
    `static StaticBuffer` | `zeroBuffer(int len)`

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

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

- - ### Field Detail

    - #### longSize

          public static final int longSize

      See Also:
        Constant Field Values

    - #### intSize

          public static final int intSize

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BufferUtil

          public BufferUtil()

  - ### Method Detail

    - #### getIntBuffer

          public static final StaticBuffer getIntBuffer(int id)

    - #### getIntBuffer

          public static final StaticBuffer getIntBuffer(int[] ids)

    - #### getLongBuffer

          public static final StaticBuffer getLongBuffer(long id)

    - #### fillBuffer

          public static final StaticBuffer fillBuffer(int len,
                                byte value)

    - #### oneBuffer

          public static final StaticBuffer oneBuffer(int len)

    - #### zeroBuffer

          public static final StaticBuffer zeroBuffer(int len)

    - #### emptyBuffer

          public static final StaticBuffer emptyBuffer()

    - #### writeEntry

          public static void writeEntry(DataOutput out,
                        Entry entry)

    - #### writeBuffer

          public static void writeBuffer(DataOutput out,
                         StaticBuffer buffer)

    - #### readEntry

          public static Entry readEntry(ReadBuffer in,
                        Serializer serializer)

    - #### readBuffer

          public static StaticBuffer readBuffer(ScanBuffer in)

    - #### nextBiggerBufferAllowOverflow

          public static final StaticBuffer nextBiggerBufferAllowOverflow(StaticBuffer buffer)

    - #### nextBiggerBuffer

          public static final StaticBuffer nextBiggerBuffer(StaticBuffer buffer)

    - #### equals

          public static final boolean equals(StaticBuffer b1,
                       ByteBuffer b2)

      Thread safe equals method for StaticBuffer - ByteBuffer equality comparison
      Parameters:
        `b1` -
        `b2` -
      Returns:

Copyright © 2012–2014. All rights reserved.