DeserializerDescriber

class DeserializerDescriber(input: InputStream, runtime: AvailRuntime) : AbstractDeserializer

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
fun DeserializerDescriber(input: InputStream, runtime: AvailRuntime)

Construct a new DeserializerDescriber.

Functions

Link copied to clipboard
fun describe(): String

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.

Properties

Link copied to clipboard
var currentModule: A_Module

The current module.

Link copied to clipboard
val loadedModules: A_Map

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