A class for managing data buffers.
Create a new instance with an empty buffer.
Create a new instance from the specified callbacks.
Create a new instance from the specified file descriptor.
Create a new instance associated with a given IO.
Create a new instance with internal buffer.
Create a new instance.
The created data types depend on arg. If arg is nil, it creates an instance with an empty buffer. Otherwise, arg is either a string, an IO, or a Pathname.
Return the encoding of the underlying data.
Set the encoding to a given encoding of the underlying data object.
Read at most length bytes from the data object, or to the end of file if length is omitted or is nil.
Seek to a given offset in the data object according to the value of whence.
Write length bytes from buffer into the data object.
[Validate]