IProtonizer
Description
- Derived from
- Extended by
-
ProtonizerBase abstract
Base interface for classes that read and write data during conversion of IProtonizable objects to binary Protocol Buffers wire format streams.
Public / Methods
ReadBegin
Imposes the given limit in for reading records from the wire stream.
- IOException
-
If an I/O error has occurred.
- See also
ReadEnd
Skips towards the read limit that has been imposed by the most recent call to ReadBegin.
- IOException
-
If an I/O error has occurred.
- See also
ReadRecord
Reads the tag of a record in a Protocol Buffers wire format stream.
Usually, records are consumed in the order in which they appear in the wire stream, where the reader inspects Record.Field and behaves accordingly. However, it may be necessary to consume the records with a specific field number in sequence. In that case, the IProtonizer may have to scan all records up to Limit and perform additional buffering.
If field opt has been 0 for the whole record sequence, the final call passing -1 may be omitted. If field opt has been greater than 0 one or more times, the final call must be made.
- IOException
-
If an I/O error has occurred.
- See also
WriteBegin
Returns a IProtonizer object that can be used to write records in a Protocol Buffers wire format stream to a separate buffer, until WriteEnd is called.
- IOException
-
If an I/O error has occurred.
WriteEnd
Fetches the content of the separate buffer that has been set up by the last call to WriteBegin and writes it to the wire format stream.
Calls to WriteBegin and WriteEnd must be balanced and may be nested.
- IOException
-
If an I/O error has occurred.
WriteRecord
Writes the tag of a record in a Protocol Buffers wire format stream.
- IOException
-
If an I/O error has occurred.
- See also
Public / Attributes
Limit
Returns the current read limit of the stream.
The initial limit may be Maths.MaxLong, which may eventually cause an IOException with IOError.EndOfFile to be thrown.