Its base object for BytesOutput, FileOutput, Socket input (including SSL).


Properties:

bigEndian

Endianness (word byte order) used when writing numbers.
If true, big-endian is used, otherwise little-endian is used. read and write property.


Methods:

writeByte(c)

Write one byte.

c - byte

writeBytes(bytes, pos, len)

Write len bytes from bytes starting by position specified by pos.
Returns the actual length of written data that can differ from len.
See writeFullBytes that tries to write the exact amount of specified bytes.

bytes - Bytes object

pos - starting position

len - size

flush()

Flush any buffered data.


close()

Close the output.
Behaviour while writing after calling this method is unspecified.


write(bytes)

Write all bytes stored in bytes.

bytes - Bytes object

writeFullBytes(bytes, pos, len)

Write len bytes from bytes starting by position specified by pos.
Unlike writeBytes, this method tries to write the exact len amount of bytes.

bytes - Bytes object

pos - starting position

len - size

writeFloat(x)

Write x as 32-bit floating point number.
Endianness is specified by the bigEndian property.

x - float number

writeDouble(x)

Write x as 64-bit double-precision floating point number.
Endianness is specified by the bigEndian property.

x - double number

writeInt8(x)

Write x as 8-bit signed integer.

x - int number

writeInt16(x)

Write x as 16-bit signed integer.
Endianness is specified by the bigEndian property.

x - int number

writeUInt16(x)

Write x as 16-bit unsigned integer.
Endianness is specified by the bigEndian property.

x - int number

writeInt24(x)

Write x as 24-bit signed integer.
Endianness is specified by the bigEndian property.

x - int number

writeUInt24(x)

Write x as 24-bit unsigned integer.
Endianness is specified by the bigEndian property.

x - int number

writeInt32(x)

Write x as 32-bit signed integer.
Endianness is specified by the bigEndian property.

x - int number

prepare(nbytes)

Inform that we are about to write at least nbytes bytes.
The underlying implementation can allocate proper working space depending on this information, or simply ignore it. This is not a mandatory call
but a tip and is only used in some specific cases.

nbytes - number of bytes

writeInput(input, bufsize)

Read all available data from input and write it.
The bufsize argument specifies the size of chunks by which data is read and written. Its default value is 4096.

input - BytesInput or FileInput object

bufsize - chunks size

writeString(string)

Write string string.

string - text to write


Created with the Personal Edition of HelpNDoc: Full-featured multi-format Help generator