Skip to content
🤔 Documentation issue? Report it

//leakcanary/shark/StreamingHprofReader/Companion

Companion

object Companion

Functions

Name Summary
readerFor fun readerFor(hprofFile: File, hprofHeader: HprofHeader = HprofHeader.parseHeaderOf(hprofFile)): StreamingHprofReader
Creates a StreamingHprofReader for the provided hprofFile. hprofHeader will be read from hprofFile unless you provide it.
fun readerFor(hprofSourceProvider: StreamingSourceProvider, hprofHeader: HprofHeader = hprofSourceProvider.openStreamingSource() .use { HprofHeader.parseHeaderOf(it) }): StreamingHprofReader
Creates a StreamingHprofReader that will call StreamingSourceProvider.openStreamingSource on every readRecords to obtain a Source to read the hprof data from. Before reading the hprof records, StreamingHprofReader will skip HprofHeader.recordsPosition bytes.