ERROR - java.nio.ReadOnlyBufferException - Possible Causes of ReadOnlyBufferException

Exception Thrown By:Cause
ClassMethod
Buffer public abstract Object
array()
If this buffer is backed
by an array but is read only
Buffer public abstract int
arrayOffset()
If this buffer is backed
by an array but is read only
ByteBuffer public final byte[]
array()
If this buffer is backed
by an array but is read only
ByteBuffer public final int
arrayOffset()
If this buffer is backed
by an array but is read only
ByteBuffer public abstract ByteBuffer
compact()
If this
buffer is read only
CharBuffer public final char[]
array()
If this buffer is backed
by an array but is read only
CharBuffer public final int
arrayOffset()
If this buffer is backed
by an array but is read only
CharBuffer public abstract CharBuffer
compact()
If this
buffer is read only
DoubleBuffer public final double[]
array()
If this buffer is backed
by an array but is read only
DoubleBuffer public final int
arrayOffset()
If this buffer is backed
by an array but is read only
DoubleBuffer public abstract DoubleBuffer
compact()
If this
buffer is read only
FloatBuffer public final float[]
array()
If this buffer is backed
by an array but is read only
FloatBuffer public final int
arrayOffset()
If this buffer is backed
by an array but is read only
FloatBuffer public abstract FloatBuffer
compact()
If this
buffer is read only
IntBuffer public final int[]
array()
If this buffer is backed
by an array but is read only
IntBuffer public final int
arrayOffset()
If this buffer is backed
by an array but is read only
IntBuffer public abstract IntBuffer
compact()
If this
buffer is read only
LongBuffer public final long[]
array()
If this buffer is backed
by an array but is read only
LongBuffer public final int
arrayOffset()
If this buffer is backed
by an array but is read only
LongBuffer public abstract LongBuffer
compact()
If this
buffer is read only
ShortBuffer public final short[]
array()
If this buffer is backed
by an array but is read only
ShortBuffer public final int
arrayOffset()
If this buffer is backed
by an array but is read only
ShortBuffer public abstract ShortBuffer
compact()
If this
buffer is read only