DeserializerDescriber

A DeserializerDescriber takes a stream of bytes and outputs a description of what would be reconstructed by a Deserializer.

Author

Mark van Gulik

Parameters

input

An InputStream from which to reconstruct objects.

runtime

The AvailRuntime from which to locate well-known objects during deserialization.

Constructors

Link copied to clipboard
constructor(input: InputStream, runtime: AvailRuntime)

Construct a new DeserializerDescriber.

Properties

Link copied to clipboard

The current module.

Link copied to clipboard

The A_Modules that were already loaded in the runtime during instance creation.

Functions

Link copied to clipboard

Decode all of the deserialization steps, and return the resulting String.

Link copied to clipboard
fun printCompressedIndex(compressedIndex: Int)

Describe a compressed index on the builder, decompressing it to ensure the compressor is advanced to its next state correctly.

Link copied to clipboard
fun readByte(): Int

Consume an unsigned byte from the input. Return it as an Int to ensure it's unsigned, i.e., 0 ≤ b ≤ 255.

Link copied to clipboard
fun readInt(): Int

Consume an int from the input in big endian order.

Link copied to clipboard
fun readShort(): Int

Consume an unsigned short from the input in big endian order. Return it as an Int to ensure it's unsigned, i.e., 0 ≤ b ≤ 65535.