< prev index next >

src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java

Print this page




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.internal.access;
  27 
  28 import java.nio.Buffer;
  29 import java.nio.ByteBuffer;
  30 
  31 public interface JavaNioAccess {
  32     /**
  33      * Provides access to information on buffer usage.
  34      */
  35     interface BufferPool {
  36         String getName();
  37         long getCount();
  38         long getTotalCapacity();
  39         long getMemoryUsed();
  40     }
  41     BufferPool getDirectBufferPool();








  42 }


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.internal.access;
  27 
  28 import java.nio.Buffer;
  29 import java.nio.ByteBuffer;
  30 
  31 public interface JavaNioAccess {
  32     /**
  33      * Provides access to information on buffer usage.
  34      */
  35     interface BufferPool {
  36         String getName();
  37         long getCount();
  38         long getTotalCapacity();
  39         long getMemoryUsed();
  40     }
  41     BufferPool getDirectBufferPool();
  42 
  43     /**
  44      * Constructs a direct ByteBuffer referring to the block of memory starting
  45      * at the given memory address and extending {@code cap} bytes.
  46      * The {@code ob} parameter is an arbitrary object that is attached
  47      * to the resulting buffer.
  48      */
  49     ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob);
  50 }
< prev index next >