ReadOnlyBufferException

  • ReadOnlyBufferException is an unchecked exception indicating an attempt to modify a read-only buffer.

  • It's thrown when methods like put or compact are used on a buffer that's not modifiable.

  • The exception provides a public constructor for creating instances.

  • ReadOnlyBufferException inherits methods from UnsupportedOperationException, Throwable, and Object for handling and investigating the exception.

public class ReadOnlyBufferException extends UnsupportedOperationException

Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer.

Public Constructor Summary

ReadOnlyBufferException()
Constructs an instance of this class.

Inherited Method Summary

Public Constructors

public ReadOnlyBufferException ()

Constructs an instance of this class.