TraceFileReader

Reads a JSON Lines (.atf) trace produced by JsonLinesAnimationOutput: readHeader consumes the first line; events streams the remaining lines as AnimationEvents lazily, so a large trace is never fully held in memory.

The reader is positional: call readHeader first, then iterate events. It is Closeable; wrap it in use { } or call close.

Constructors

Link copied to clipboard
constructor(reader: BufferedReader)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

How many lines events skipped because they named an event type this version does not know. A trace written by a newer version can carry such events; skipping them, rather than failing on the first, lets an older reader show everything it does understand. A line that is not a well-formed event of a known type still fails.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard

A lazy sequence over the remaining event lines. Blank lines are skipped. Because it reads from the shared reader, consume it after readHeader and before close.

Link copied to clipboard

Reads and decodes the header line. Call this once, before events.