< prev index next >

src/java.base/share/classes/java/nio/Buffer.java

Print this page




 722             throw new IndexOutOfBoundsException();
 723         return i;
 724     }
 725 
 726     final int markValue() {                             // package-private
 727         return mark;
 728     }
 729 
 730     final void discardMark() {                          // package-private
 731         mark = -1;
 732     }
 733 
 734     static {
 735         // setup access to this package in SharedSecrets
 736         SharedSecrets.setJavaNioAccess(
 737             new JavaNioAccess() {
 738                 @Override
 739                 public JavaNioAccess.BufferPool getDirectBufferPool() {
 740                     return Bits.BUFFER_POOL;
 741                 }




 742             });
 743     }
 744 
 745 }


 722             throw new IndexOutOfBoundsException();
 723         return i;
 724     }
 725 
 726     final int markValue() {                             // package-private
 727         return mark;
 728     }
 729 
 730     final void discardMark() {                          // package-private
 731         mark = -1;
 732     }
 733 
 734     static {
 735         // setup access to this package in SharedSecrets
 736         SharedSecrets.setJavaNioAccess(
 737             new JavaNioAccess() {
 738                 @Override
 739                 public JavaNioAccess.BufferPool getDirectBufferPool() {
 740                     return Bits.BUFFER_POOL;
 741                 }
 742                 @Override
 743                 public ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob) {
 744                     return new DirectByteBuffer(addr, cap, ob);
 745                 }
 746             });
 747     }
 748 
 749 }
< prev index next >