Class DTFJHeapObjectReader

  • All Implemented Interfaces:
    IObjectReader

    public class DTFJHeapObjectReader
    extends java.lang.Object
    implements IObjectReader
    Reads details of an object from a DTFJ dump.
    • Constructor Detail

      • DTFJHeapObjectReader

        public DTFJHeapObjectReader()
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: IObjectReader
        tidy up when snapshot no longer required
        Specified by:
        close in interface IObjectReader
        Throws:
        java.io.IOException - should not normally occur
      • open

        public void open​(ISnapshot snapshot)
                  throws java.io.IOException,
                         SnapshotException
        Description copied from interface: IObjectReader
        Open the dump file associated with the snapshot
        Specified by:
        open in interface IObjectReader
        Parameters:
        snapshot - the snapshot
        Throws:
        java.io.IOException - an IO problem, or corrupt indexes or unexpected data in the dump
        SnapshotException - some other problem
      • readPrimitiveArrayContent

        public java.lang.Object readPrimitiveArrayContent​(PrimitiveArrayImpl array,
                                                          int offset,
                                                          int length)
                                                   throws java.io.IOException,
                                                          SnapshotException
        Read some of the contents of an array
        Specified by:
        readPrimitiveArrayContent in interface IObjectReader
        Parameters:
        array - The MAT array to be read
        offset - the offset into the array
        length - the number of items to be read
        Returns:
        A primitive array holding the items
        Throws:
        java.io.IOException - an IO problem or unexpected data in the dump
        SnapshotException - some other problem such as where the object is incompatible with the snapshot
      • readObjectArrayContent

        public long[] readObjectArrayContent​(ObjectArrayImpl array,
                                             int offset,
                                             int length)
                                      throws java.io.IOException,
                                             SnapshotException
        Read some of the contents of an array
        Specified by:
        readObjectArrayContent in interface IObjectReader
        Parameters:
        array - The MAT array to be read
        offset - the offset into the array
        length - the number of items to be read
        Returns:
        A array of longs holding the addresses of the objects in the array
        Throws:
        java.io.IOException - an IO problem or unexpected data in the dump
        SnapshotException - some other problem such as where the object is incompatible with the snapshot