A DESCRIPTION OF THE REQUEST : Please provide a way to construct an immutable object from java.nio.Buffer and its subclasses. Currently, classes that take ByteBuffer as input must make defensive copies to prevent the buffer from being modified in the future. ByteBuffer.isReadOnly() doesn't guarantee that the original owner won't modifying the buffer. This can't be implemented by end-users because ByteBuffer cannot be subclassed. JUSTIFICATION : Performance, readability and security improvements. CUSTOMER SUBMITTED WORKAROUND : Create defensive copies of the buffer
|