Package java.nio

Class NioUtils


  • public final class NioUtils
    extends Object
    • Method Detail

      • freeDirectBuffer

        public static void freeDirectBuffer​(ByteBuffer buffer)
      • getFD

        public static FileDescriptor getFD​(FileChannel fc)
        Returns the int file descriptor from within the given FileChannel 'fc'.
      • unsafeArray

        public static byte[] unsafeArray​(ByteBuffer b)
        Exposes the array backing a non-direct ByteBuffer, even if the ByteBuffer is read-only. Normally, attempting to access the array backing a read-only buffer throws.
      • unsafeArrayOffset

        public static int unsafeArrayOffset​(ByteBuffer b)
        Exposes the array offset for the array backing a non-direct ByteBuffer, even if the ByteBuffer is read-only.