Module openj9.dtfj

Class AbstractCoreReader

java.lang.Object
com.ibm.j9ddr.corereaders.AbstractCoreReader
All Implemented Interfaces:
ICore
Direct Known Subclasses:
AIXDumpReader, MachoDumpReader, MiniDumpReader

public abstract class AbstractCoreReader extends Object implements ICore
  • Field Details

  • Constructor Details

    • AbstractCoreReader

      protected AbstractCoreReader()
  • Method Details

    • setReader

      public void setReader(ImageInputStream reader) throws IOException
      This sets the reader to use to retrieve the underlying bytes to process. The reader may perform buffering or other operations before making the data available. Subclasses should override this method if additional actions need to be performed when the reader is set, typically this will be things such as an initial read of the data.
      Parameters:
      reader -
      Throws:
      IOException
    • readLong

      public long readLong() throws IOException
      Throws:
      IOException
    • readInt

      public int readInt() throws IOException
      Throws:
      IOException
    • readShort

      public short readShort() throws IOException
      Throws:
      IOException
    • readByte

      public byte readByte() throws IOException
      Throws:
      IOException
    • seek

      public void seek(long pos) throws IOException
      Throws:
      IOException
    • readBytes

      public byte[] readBytes(int len) throws IOException
      Throws:
      IOException
    • readFully

      public void readFully(byte[] b) throws IOException
      Throws:
      IOException
    • readFully

      public void readFully(byte[] buffer, int offset, int length) throws IOException
      Throws:
      IOException
    • checkOffset

      protected boolean checkOffset(long location) throws IOException
      Throws:
      IOException
    • readString

      protected String readString() throws IOException
      Throws:
      IOException
    • format

      public static String format(int i)
    • format

      public static String format(long l)
    • readLong

      protected static long readLong(byte[] data, int start)
    • readInt

      protected static int readInt(byte[] data, int start)
    • close

      public void close() throws IOException
      Description copied from interface: ICore
      Close the handle to the core file and release any resources
      Specified by:
      close in interface ICore
      Throws:
      IOException