Class DirectByteBuffers


  • final class DirectByteBuffers
    extends java.lang.Object
    Utility to facilitate disposing of direct byte buffer instances.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.invoke.MethodHandle CLEAN_HANDLE  
      (package private) static java.lang.Class<? extends java.nio.ByteBuffer> DIRECT_BUFFER_CLAZZ
      Sun specific mechanisms to clean up resources associated with direct byte buffers.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.Class<?> lookupClassQuietly​(java.lang.String name)  
      (package private) static boolean nonNull​(java.lang.Object o)  
      static void releaseDirectByteBuffer​(java.nio.ByteBuffer buffer)
      Provides jvm implementation specific operation to aggressively release resources associated with buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DIRECT_BUFFER_CLAZZ

        static final java.lang.Class<? extends java.nio.ByteBuffer> DIRECT_BUFFER_CLAZZ
        Sun specific mechanisms to clean up resources associated with direct byte buffers.
      • CLEAN_HANDLE

        static final java.lang.invoke.MethodHandle CLEAN_HANDLE
    • Constructor Detail

      • DirectByteBuffers

        DirectByteBuffers()
    • Method Detail

      • lookupClassQuietly

        private static java.lang.Class<?> lookupClassQuietly​(java.lang.String name)
      • nonNull

        static boolean nonNull​(java.lang.Object o)
      • releaseDirectByteBuffer

        public static void releaseDirectByteBuffer​(java.nio.ByteBuffer buffer)
        Provides jvm implementation specific operation to aggressively release resources associated with buffer.
        Parameters:
        buffer - The ByteBuffer to release. Must not be null. Must be direct.