Skip to content
🤔 Documentation issue? Report it

//leakcanary-repo/shark/RandomAccessHprofReader

RandomAccessHprofReader

[jvm]\ class RandomAccessHprofReader : Closeable

Reads records in a Hprof source, one at a time with a specific position and size. Call openReaderFor to obtain a new instance.

Types

Name Summary
Companion [jvm]
object Companion

Functions

Name Summary
close [jvm]
open override fun close()
readRecord [jvm]
fun <T> readRecord(recordPosition: Long, recordSize: Long, withRecordReader: HprofRecordReader.() -> T): T
Loads recordSize bytes at recordPosition into the buffer that backs HprofRecordReader then calls withRecordReader with that reader as a receiver. withRecordReader is expected to use the receiver reader to read one record of exactly recordSize bytes.