//leakcanary/shark/RandomAccessHprofReader
RandomAccessHprofReader¶
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 | object Companion |
Functions¶
Name | Summary |
---|---|
close | open override fun close() |
readRecord | 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. |