org.apache.directmemory.memory.allocator
Class DirectByteBufferUtils

java.lang.Object
  extended by org.apache.directmemory.memory.allocator.DirectByteBufferUtils

public class DirectByteBufferUtils
extends Object

Utility class around direct ByteBuffer


Constructor Summary
DirectByteBufferUtils()
           
 
Method Summary
static void destroyDirectByteBuffer(ByteBuffer buffer)
          Clear and release the internal content of a direct ByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectByteBufferUtils

public DirectByteBufferUtils()
Method Detail

destroyDirectByteBuffer

public static void destroyDirectByteBuffer(ByteBuffer buffer)
                                    throws IllegalArgumentException,
                                           IllegalAccessException,
                                           InvocationTargetException,
                                           SecurityException,
                                           NoSuchMethodException
Clear and release the internal content of a direct ByteBuffer. Clearing manually the content avoid waiting till the GC do his job.

Parameters:
buffer - : the buffer to clear
Throws:
IllegalArgumentException
IllegalAccessException
InvocationTargetException
SecurityException
NoSuchMethodException


Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.