IByteWriter

Description

interface Tinman.Core.IO.IByteWriter

Derived from

IFlushable
IPathInfo

Extended by

IBinaryWriter

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

The methods of this interface write single-byte values which are not affected by byte order.

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​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 IByteWriter.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​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​Bool


public static 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​Int16_​BE


public static method WriteInt16_BE → (1)

value in : int16

The value to write.

Writes a big-endian 16-bit signed integer to the stream.

IOException

If an I/O error has occurred.

Write​Int16_​LE


public static method WriteInt16_LE → (1)

value in : int16

The value to write.

Writes a little-endian 16-bit signed integer to the stream.

IOException

If an I/O error has occurred.

Write​Int32_​BE


public static method WriteInt32_BE → (1)

value in : int32

The value to write.

Writes a big-endian 32-bit signed integer to the stream.

IOException

If an I/O error has occurred.

Write​Int32_​LE


public static method WriteInt32_LE → (1)

value in : int32

The value to write.

Writes a little-endian 32-bit signed integer to the stream.

IOException

If an I/O error has occurred.

Write​Int64_​BE


public static method WriteInt64_BE → (1)

value in : int64

The value to write.

Writes a big-endian 64-bit signed integer to the stream.

IOException

If an I/O error has occurred.

Write​Int64_​LE


public static method WriteInt64_LE → (1)

value in : int64

The value to write.

Writes a little-endian 64-bit signed integer to the stream.

IOException

If an I/O error has occurred.

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.