
kshark.HprofReader.kt Maven / Gradle / Ivy
package kshark
import kshark.StreamingRecordReaderAdapter.Companion.asStreamingRecordReader
import kotlin.reflect.KClass
@Deprecated("Replaced by HprofStreamingReader.readerFor or HprofRandomAccessReader.openReaderFor")
class HprofReader internal constructor(
private val hprof: Hprof
) {
val identifierByteSize: Int
get() = hprof.header.identifierByteSize
val startPosition: Long
get() = hprof.header.recordsPosition.toLong()
fun readHprofRecords(
recordTypes: Set>,
listener: OnHprofRecordListener
) {
val reader = StreamingHprofReader.readerFor(hprof.file, hprof.header).asStreamingRecordReader()
reader.readRecords(recordTypes, listener)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy