- java.lang.Object
- 
- com.ibm.dtfj.phd.parser.Base
- 
- com.ibm.dtfj.phd.parser.HeapdumpReader
 
 
- 
 public class HeapdumpReader extends Base This class parses a PHD format heapdump file. To use it, first create the object (seeHeapdumpReader(java.lang.String)) passing the file name and then parse it (seeparse(com.ibm.dtfj.phd.parser.PortableHeapDumpListener)) passing it an object that obeys thePortableHeapDumpListenerinterface.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description HeapdumpReader(File file, PHDImage image)Create a new HeapdumpReader object from the given file.protectedHeapdumpReader(String filename)Create a new HeapdumpReader object from the given file.protectedHeapdumpReader(ImageInputStream stream)Create a new HeapdumpReader object from the given stream.HeapdumpReader(ImageInputStream stream, PHDImage image)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallObjectsHashed()Returns true all objects in this heap dump will have hashcodes set, regardless of the flags on the record.voidclose()voidexitParse()Stringfull_version()Returns the full version for the JVM that created this heapdump.booleanis64Bit()Returns true if this is a 64-bit heap dump.booleanisJ9()Returns true if this is a J9 heap dump.static voidmain(String[] args)This method just prints out the following info from the header: is64Bit phd version full version total objects total refsbooleanparse(PortableHeapDumpListener listener)Parse the heapdump.voidreleaseResources()inttotalObjects()Returns the total number of objects in the dump.inttotalRefs()Returns the total number of references in the dump.intversion()Returns the Phd version number.
 
- 
- 
- 
Constructor Detail- 
HeapdumpReaderpublic HeapdumpReader(File file, PHDImage image) throws IOException Create a new HeapdumpReader object from the given file. The file must be in Phd format. Image must be supplied to allow us to clean up streams when it is closed.- Throws:
- IOException
 
 - 
HeapdumpReaderpublic HeapdumpReader(ImageInputStream stream, PHDImage image) throws IOException - Throws:
- IOException
 
 - 
HeapdumpReaderprotected HeapdumpReader(ImageInputStream stream) throws IOException Create a new HeapdumpReader object from the given stream. The file must be in Phd format.- Throws:
- IOException
 
 - 
HeapdumpReaderprotected HeapdumpReader(String filename) throws IOException Create a new HeapdumpReader object from the given file. The file must be in Phd format.- Throws:
- IOException
 
 
- 
 - 
Method Detail- 
full_versionpublic String full_version() Returns the full version for the JVM that created this heapdump.
 - 
versionpublic int version() Returns the Phd version number. Recognized values are 4 and 5.
 - 
is64Bitpublic boolean is64Bit() Returns true if this is a 64-bit heap dump.
 - 
isJ9public boolean isJ9() Returns true if this is a J9 heap dump.
 - 
allObjectsHashedpublic boolean allObjectsHashed() Returns true all objects in this heap dump will have hashcodes set, regardless of the flags on the record.
 - 
totalObjectspublic int totalObjects() Returns the total number of objects in the dump.
 - 
totalRefspublic int totalRefs() Returns the total number of references in the dump.
 - 
exitParsepublic void exitParse() 
 - 
parsepublic boolean parse(PortableHeapDumpListener listener) throws Exception Parse the heapdump. This uses callbacks via the PortableHeapDumpListener interface. Any exceptions that the listener raises are propagated back.- Returns:
- true if there is more data to parse
- Throws:
- Exception
 
 - 
closepublic void close() 
 - 
releaseResourcespublic void releaseResources() 
 - 
mainpublic static void main(String[] args) throws IOException This method just prints out the following info from the header:- is64Bit
- phd version
- full version
- total objects
- total refs
 - Throws:
- IOException
 
 
- 
 
-