Module: Net::SSH::Util::WriterBufferImpl

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

A convenience module for writing a string of encoded data. It provides an interface for easily writing and encoding data.

### Methods

write write_bignum write_bool write_byte write_int64 write_key write_long write_short write_string

### Public Instance methods

write( *data )

Writes the given data literally into the string.

write_bignum( *n )

Writes each argument to the buffer as a bignum (SSH2-style). No checking is done to ensure that the arguments are, in fact, bignums.

write_bool( *b )

Writes each argument to the buffer as a (C-style) boolean, with 1 meaning true, and 0 meaning false.

write_byte( *n )

Writes each argument to the buffer as a byte.

write_int64( *n )

Writes each argument to the buffer as a network-byte-order-encoded 64-bit integer (8 bytes).

write_key( *key )

Writes the given arguments to the buffer as SSH2-encoded keys.

write_long( *n )

Writes each argument to the buffer as a network-byte-order-encoded long (4-byte) integer.

write_short( *n )

Writes each argument to the buffer as a network-byte-order-encoded short (2-byte) integer.

write_string( *text )

Writes each argument to the buffer as an SSH2-encoded string. Each string is prefixed by its length, encoded as a 4-byte long integer.

[Validate]