org.apache.hadoop.hbase.util
Class UnsafeAccess

java.lang.Object
  extended by org.apache.hadoop.hbase.util.UnsafeAccess

@InterfaceAudience.Private
@InterfaceStability.Evolving
public final class UnsafeAccess
extends Object


Field Summary
static int BYTE_ARRAY_BASE_OFFSET
          The offset to the first element in a byte array.
static sun.misc.Unsafe theUnsafe
           
 
Method Summary
static void copy(byte[] src, int srcOffset, ByteBuffer dest, int destOffset, int length)
          Copies the bytes from given array's offset to length part into the given buffer.
static void copy(ByteBuffer src, int srcOffset, byte[] dest, int destOffset, int length)
          Copies specified number of bytes from given offset of src ByteBuffer to the dest array.
static void copy(ByteBuffer src, int srcOffset, ByteBuffer dest, int destOffset, int length)
          Copies specified number of bytes from given offset of src buffer into the dest buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theUnsafe

public static final sun.misc.Unsafe theUnsafe

BYTE_ARRAY_BASE_OFFSET

public static final int BYTE_ARRAY_BASE_OFFSET
The offset to the first element in a byte array.

Method Detail

copy

public static void copy(byte[] src,
                        int srcOffset,
                        ByteBuffer dest,
                        int destOffset,
                        int length)
Copies the bytes from given array's offset to length part into the given buffer.

Parameters:
src -
srcOffset -
dest -
destOffset -
length -

copy

public static void copy(ByteBuffer src,
                        int srcOffset,
                        byte[] dest,
                        int destOffset,
                        int length)
Copies specified number of bytes from given offset of src ByteBuffer to the dest array.

Parameters:
src -
srcOffset -
dest -
destOffset -
length -

copy

public static void copy(ByteBuffer src,
                        int srcOffset,
                        ByteBuffer dest,
                        int destOffset,
                        int length)
Copies specified number of bytes from given offset of src buffer into the dest buffer.

Parameters:
src -
srcOffset -
dest -
destOffset -
length -


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.