Protonizer

Description

sealed class Tinman.Core.IO.Serialization.Protonizer

Derived from

ProtonizerBase abstract

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

For


public static method For → (1)

stream in : IDataStream

[not-null]
The data stream to use.

returns → IProtonizer

The created IProtonizer object.

Creates a new instance of IProtonizer.

Read


public static method Read → (4)

data in : int8 [ ]

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

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.

pathInfo opt : Path = null

Optional value for IPathInfo.PathInfo.

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 IBytePosition.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 or null iff ICanWrite.CanWrite is false.

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. If ICanWrite.CanWrite is false, no bytes will be written.

Returns the buffered bytes.

IOException

If an I/O error has occurred.

See also

Protonizer.Clear