public class HprofHeapObjectReader extends Object implements IObjectReader
| Modifier and Type | Field and Description |
|---|---|
static String |
HPROF_LENGTH_PROPERTY |
static String |
VERSION_PROPERTY |
| Constructor and Description |
|---|
HprofHeapObjectReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
tidy up when snapshot no longer required
|
<A> A |
getAddon(Class<A> addon)
Returns extra data to be provided by
ISnapshot.getSnapshotAddons(Class addon). |
void |
open(ISnapshot snapshot)
Open the dump file associated with the snapshot
|
IObject |
read(int objectId,
ISnapshot snapshot)
Get detailed information about an object
|
long[] |
readObjectArrayContent(ObjectArrayImpl array,
int offset,
int length)
Get detailed information about a object array
|
Object |
readPrimitiveArrayContent(PrimitiveArrayImpl array,
int offset,
int length)
Get detailed information about a primitive array
|
public static final String VERSION_PROPERTY
public static final String HPROF_LENGTH_PROPERTY
public void open(ISnapshot snapshot) throws IOException
IObjectReaderopen in interface IObjectReaderIOExceptionpublic long[] readObjectArrayContent(ObjectArrayImpl array, int offset, int length) throws IOException, SnapshotException
IObjectReaderreadObjectArrayContent in interface IObjectReaderoffset - where in the array to startlength - how much to readIOExceptionSnapshotExceptionpublic Object readPrimitiveArrayContent(PrimitiveArrayImpl array, int offset, int length) throws IOException, SnapshotException
IObjectReaderreadPrimitiveArrayContent in interface IObjectReaderarray - the arrayoffset - where in the array to startlength - how much to readIOExceptionSnapshotExceptionpublic IObject read(int objectId, ISnapshot snapshot) throws SnapshotException, IOException
IObjectReaderread in interface IObjectReaderobjectId - the object idsnapshot - the snapshotInstanceImpl, ObjectArrayImpl, PrimitiveArrayImpl, ClassLoaderImplSnapshotExceptionIOExceptionpublic <A> A getAddon(Class<A> addon) throws SnapshotException
ISnapshot.getSnapshotAddons(Class addon). Also can be returned
via Argument.getAddon in interface IObjectReaderaddon - the type of the extra data required from the dump.
HprofHeapObjectReader can be extended using an
IRuntimeEnhancer extension to return extra data.SnapshotExceptionIObjectReader.getAddon(Class)public void close()
throws IOException
IObjectReaderclose in interface IObjectReaderIOException