Slide 44
Slide 44 text
while (!exhausted()) {
// type of the record
val tag = readUnsignedByte()
// number of microseconds since the time stamp in the header
skip(INT_SIZE)
// number of bytes that follow and belong to this record
val length = readUnsignedInt()
when (tag) {
STRING_IN_UTF8 -> {
val callback = callbacks.get()
val id = readId()
val stringLength = length - idSize
val string = readUtf8(stringLength)
callback(StringRecord(id, string))
}
// ...
@Piwai