HprofPrimitiveArrayStripper

class HprofPrimitiveArrayStripper

Converts a Hprof file to another file with all primitive arrays replaced with arrays of zeroes, which can be useful to remove PII. Char arrays are handled slightly differently because 0 would be the null character so instead these become arrays of '?'.

Constructors

HprofPrimitiveArrayStripper
Link copied to clipboard
fun HprofPrimitiveArrayStripper()

Functions

stripPrimitiveArrays
Link copied to clipboard
fun stripPrimitiveArrays(inputHprofFile: File, outputHprofFile: File = File( inputHprofFile.parent, inputHprofFile.name.replace( ".hprof", "-stripped.hprof" ).let { if (it != inputHprofFile.name) it else inputHprofFile.name + "-stripped" })): File
fun stripPrimitiveArrays(hprofSourceProvider: StreamingSourceProvider, hprofSink: BufferedSink)