Class CodePointBuffer


  • public class CodePointBuffer
    extends java.lang.Object
    Wrapper for ByteBuffer / CharBuffer / IntBuffer. Because Java lacks generics on primitive types, these three types do not share an interface, so we have to write one manually.
    • Field Detail

      • byteBuffer

        private final java.nio.ByteBuffer byteBuffer
      • charBuffer

        private final java.nio.CharBuffer charBuffer
      • intBuffer

        private final java.nio.IntBuffer intBuffer
    • Constructor Detail

      • CodePointBuffer

        private CodePointBuffer​(CodePointBuffer.Type type,
                                java.nio.ByteBuffer byteBuffer,
                                java.nio.CharBuffer charBuffer,
                                java.nio.IntBuffer intBuffer)
    • Method Detail

      • withBytes

        public static CodePointBuffer withBytes​(java.nio.ByteBuffer byteBuffer)
      • withChars

        public static CodePointBuffer withChars​(java.nio.CharBuffer charBuffer)
      • withInts

        public static CodePointBuffer withInts​(java.nio.IntBuffer intBuffer)
      • position

        public int position()
      • position

        public void position​(int newPosition)
      • remaining

        public int remaining()
      • get

        public int get​(int offset)
      • arrayOffset

        int arrayOffset()
      • byteArray

        byte[] byteArray()
      • charArray

        char[] charArray()
      • intArray

        int[] intArray()