Method: BSON::ByteBuffer#length

Defined in:

#lengthFixnum

Returns the number of bytes available to be read in the buffer.

When a buffer is being written to, each added byte increases its length. When a buffer is being read from, each read byte decreases its length.

Returns:

  • (Fixnum)