Protonizer

Description

sealed class Tinman.Core.IO.Serialization.Protonizer

Derived from

IProtonizer

Default implementation of the IProtonizer interface.

As an alternative to this class, the Serializer class may be used, which also implements the IProtonizer interface.

Public / Constructors

Read


public static method Read → (4)

data in : int8 [ ]

[not-null]
The wire format stream to read.

pathInfo opt : Path = null

Optional value for IPathInfo.PathInfo.

offset opt : int32 = 0

[0..data.Length]
Offset into data in.

length opt : int32 = -1

[-1..data.Length-offset]
Number of bytes in data in to read.

returns → IProtonizer

The created Protonizer object.

Creates a new instance of Protonizer for reading.

Write


public static method Write → (1)

pathInfo opt : Path = null

Optional value for IPathInfo.PathInfo.

returns → Protonizer

The created Protonizer object.

Creates a new instance of Protonizer for writing.

Public / Methods

Clear


public method Clear → ()

Clears the wire format stream.

This method resets IProtonizer.Position to zero and also clears the internal buffer to zero.

Output

2 overloads


public method Output1 → ()

returns → int8 [ ]

The bytes that have been written so far.

Returns the buffered bytes.

IOException

If an I/O error has occurred.

See also

Protonizer.Clear


public method Output2 → (1)

writer in : IByteWriter

[not-null]
The writer to use for outputting the bytes that have been written so far.

Returns the buffered bytes.

IOException

If an I/O error has occurred.

See also

Protonizer.Clear