IBinaryWriter

Description

interface Tinman.Core.IO.IBinaryWriter

Derived from

IFlushable

Extended by

IDataStream
ISerializer

Base interface for classes that sequentially write data to a binary stream.

Public / Methods

Write


public method Write → (1)

bytes in : ByteBuffer

[not-null]
The bytes to write, starting at ByteBuffer.Position, up to ByteBuffer.Limit. The buffer position will be incremented by this method.

Writes a number of bytes to the stream.

IOException

If an I/O error has occurred.

Write​Bool


public method WriteBool → (1)

value in : bool

The value to write: true = 1, false = 0

Writes an 8-bit boolean value to the stream.

IOException

If an I/O error has occurred.

Write​Bools


public method WriteBools → (3)

array in : bool [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes 8-bit boolean values to the data stream.

Calling this method is equivalent to calling WriteBool sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Write​Char


public method WriteChar → (1)

value in : char

The value to write.

Writes an unsigned 16-bit UTF-16 code unit to the stream.

IOException

If an I/O error has occurred.

Write​Chars


public method WriteChars → (3)

array in : char [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes unsigned 16-bit UTF-16 code units to the data stream.

Calling this method is equivalent to calling WriteChar sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Write​Float32


public method WriteFloat32 → (1)

value in : float32

The value to write.

Writes a 32-bit floating point value to the data stream.

IOException

If an I/O error has occurred.

Write​Float32s


public method WriteFloat32s → (3)

array in : float32 [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes 32-bit floating point values to the data stream.

Calling this method is equivalent to calling WriteFloat32 sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Write​Float64


public method WriteFloat64 → (1)

value in : float64

The value to write.

Writes a 64-bit floating point value to the data stream.

IOException

If an I/O error has occurred.

Write​Float64s


public method WriteFloat64s → (3)

array in : float64 [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes 64-bit floating point values to the data stream.

Calling this method is equivalent to calling WriteFloat64 sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Write​Int16


public method WriteInt16 → (1)

value in : int16

The value to write.

Writes a signed 16-bit integer value to the data stream.

IOException

If an I/O error has occurred.

Write​Int16s


public method WriteInt16s → (3)

array in : int16 [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes signed 16-bit integer values to the data stream.

Calling this method is equivalent to calling WriteInt16 sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Write​Int32


public method WriteInt32 → (1)

value in : int32

The value to write.

Writes a signed 32-bit integer value to the data stream.

IOException

If an I/O error has occurred.

Write​Int32s


public method WriteInt32s → (3)

array in : int32 [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes signed 32-bit integer values to the data stream.

Calling this method is equivalent to calling WriteInt32 sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Write​Int64


public method WriteInt64 → (1)

value in : int64

The value to write.

Writes a signed 64-bit integer value to the data stream.

IOException

If an I/O error has occurred.

Write​Int64s


public method WriteInt64s → (3)

array in : int64 [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes signed 64-bit integer values to the data stream.

Calling this method is equivalent to calling WriteInt64 sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Write​Int8


public method WriteInt8 → (1)

value in : int8

The value to write.

Writes a signed 8-bit integer value to the stream.

IOException

If an I/O error has occurred.

Write​Int8s


public method WriteInt8s → (3)

array in : int8 [ ]

[not-null]
The input array.

offset in : int32

[>=0]
Index of first array element to read.

count in : int32

[>=0]
Number of values to write.

Writes signed 8-bit integer values to the data stream.

Calling this method is equivalent to calling WriteInt8 sequentially for each element in the given array in segment but may be implemented in a more efficient way.

IOException

If an I/O error has occurred.

Extensions

Write​Var​Int32


public static method WriteVarInt32 → (1)

value in : int32

The value to write.

Writes a 32-bit value to the stream, using variable coding from one to five bytes.

The encoding is independent on byte endianness.

IOException

If an I/O error has occurred.

Write​Var​Int64


public static method WriteVarInt64 → (2)

value in : int64

The value to write.

shortcut opt : bool = true

Use shortcut coding?

Writes a 64-bit value to the stream, using variable coding from one to nine (with shortcut opt coding) or ten (without shortcut opt coding) bytes.

The encoding is independent on byte endianness.

IOException

If an I/O error has occurred.

Write​Var​UInt32


public static method WriteVarUInt32 → (1)

value in : int32

The value to write.

Writes a 32-bit value to the stream, using variable coding from one to five bytes.

The encoding is independent on byte endianness.

IOException

If an I/O error has occurred.

Write​Var​UInt64


public static method WriteVarUInt64 → (2)

value in : int64

The value to write.

shortcut opt : bool = true

Use shortcut coding?

Writes a 64-bit value to the stream, using variable coding from one to nine (with shortcut opt coding) or ten (without shortcut opt coding) bytes.

The encoding is independent on byte endianness.

IOException

If an I/O error has occurred.