Re: UnsupportedOperationException from Buffers.newDirectByteBuffer()
Administrator
857 posts
This is because ByteBuffer doesn't support the array() method for direct buffers, only for buffers allocated on the heap. With heap buffers, you pass a byte array into the constructor that it just gives back to you for array(). But in a direct buffer, it stores only the memory address of a native memory area, which is not a Java array object.