BufferOverflowException is thrown when elements are written to a buffer but there is not enough remaining space in the buffer.
BufferUnderflowException is thrown when elements are read from a buffer but there are not enough remaining elements in the buffer.
InvalidMarkException is thrown when
reset() is called on a buffer, but no mark has been set previously.
ReadOnlyBufferException is thrown when some write operation is called on a read-only buffer.