Module Net::SSH::Util::ReaderBufferImpl
In: lib/net/ssh/util/buffer.rb

A convenience module for representing a string of encoded data. It provides an interface for easily reading and decoding the buffer.

Methods

Attributes

position  [R]  the current position of the pointer in the buffer

Public Instance methods

Appends the given text to the end of the buffer.

Resets the buffer, making it empty.

Returns true if the pointer is at the end of the buffer.

Reads count bytes from the buffer. If count is nil, this will return all remaining text in the buffer. This method will increment the pointer.

Read a single byte and convert it into a boolean, using ‘C’ rules (i.e., zero is false, non-zero is true).

Read and return the next byte in the buffer.

Return the next 8 bytes as a 64-bit integer (in network byte order).

Return the next four bytes as a long integer (in network byte order).

Read the next two bytes as a short integer (in network byte order).

Read and return an SSH2-encoded string. The string starts with a long integer that describes the number of bytes remaining in the string.

Returns all text from the current pointer to the end of the buffer as a new buffer as the same class as the receiver.

Resets the pointer to the start of the buffer.

[Validate]