MemoryUtil (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.utils.memory

## Class MemoryUtil

- java.lang.Object
- - org.apache.cassandra.utils.memory.MemoryUtil

-     public abstract class MemoryUtil
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `INVERTED_ORDER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemoryUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte` | `getByte(long address)`
    `static java.nio.ByteBuffer` | `getByteBuffer(long address, int length)`
    `static void` | `getBytes(long address, byte[] buffer, int bufferOffset, int count)` Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset
    `static int` | `getInt(long address)`
    `static int` | `getIntByByte(long address)`
    `static long` | `getLong(long address)`
    `static long` | `getLongByByte(long address)`
    `static int` | `getShort(long address)`
    `static int` | `getShortByByte(long address)`
    `static void` | `putIntByByte(long address, int value)`
    `static void` | `putLongByByte(long address, long value)`
    `static void` | `setByte(long address, byte b)`
    `static void` | `setBytes(byte[] src, int offset, long trg, long count)`
    `static void` | `setBytes(long address, byte[] buffer, int bufferOffset, int count)` Transfers count bytes from buffer to Memory
    `static void` | `setBytes(long address, java.nio.ByteBuffer buffer)`
    `static void` | `setBytes(long src, long trg, long count)`
    `static void` | `setInt(long address, int l)`
    `static void` | `setLong(long address, long l)`
    `static void` | `setShort(long address, short s)`

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

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

- - ### Field Detail

    - #### INVERTED_ORDER

          public static final boolean INVERTED_ORDER

  - ### Constructor Detail

    - #### MemoryUtil

          public MemoryUtil()

  - ### Method Detail

    - #### setByte

          public static void setByte(long address,
                     byte b)

    - #### setShort

          public static void setShort(long address,
                      short s)

    - #### setInt

          public static void setInt(long address,
                    int l)

    - #### setLong

          public static void setLong(long address,
                     long l)

    - #### getByte

          public static byte getByte(long address)

    - #### getShort

          public static int getShort(long address)

    - #### getInt

          public static int getInt(long address)

    - #### getLong

          public static long getLong(long address)

    - #### getByteBuffer

          public static java.nio.ByteBuffer getByteBuffer(long address,
                                          int length)

    - #### getLongByByte

          public static long getLongByByte(long address)

    - #### getIntByByte

          public static int getIntByByte(long address)

    - #### getShortByByte

          public static int getShortByByte(long address)

    - #### putLongByByte

          public static void putLongByByte(long address,
                           long value)

    - #### putIntByByte

          public static void putIntByByte(long address,
                          int value)

    - #### setBytes

          public static void setBytes(long address,
                      java.nio.ByteBuffer buffer)

    - #### setBytes

          public static void setBytes(long address,
                      byte[] buffer,
                      int bufferOffset,
                      int count)

      Transfers count bytes from buffer to Memory
      Parameters:
        `address` - start offset in the memory
        `buffer` - the data buffer
        `bufferOffset` - start offset of the buffer
        `count` - number of bytes to transfer

    - #### setBytes

          public static void setBytes(long src,
                      long trg,
                      long count)

    - #### setBytes

          public static void setBytes(byte[] src,
                      int offset,
                      long trg,
                      long count)

    - #### getBytes

          public static void getBytes(long address,
                      byte[] buffer,
                      int bufferOffset,
                      int count)

      Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset
      Parameters:
        `address` - start offset in the memory
        `buffer` - the data buffer
        `bufferOffset` - start offset of the buffer
        `count` - number of bytes to transfer

Copyright © 2014 The Apache Software Foundation