- 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 Summary
Fields Modifier and Type Field Description protected ImageInputStream_fileReaderprotected Collection<? extends IMemorySource>_memoryRangesprotected FilecoreFile-
Fields declared in interface com.ibm.j9ddr.corereaders.ICore
CORE_CREATE_TIME_PROPERTY, PROCESSOR_COUNT_PROPERTY, PROCESSOR_SUBTYPE_PROPERTY, PROCESSOR_TYPE_PROPERTY, SYSTEM_SUBTYPE_PROPERTY, SYSTEM_TYPE_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCoreReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckOffset(long location)static Stringformat(int i)static Stringformat(long l)bytereadByte()byte[]readBytes(int len)voidreadFully(byte[] b)voidreadFully(byte[] buffer, int offset, int length)intreadInt()protected static intreadInt(byte[] data, int start)longreadLong()protected static longreadLong(byte[] data, int start)shortreadShort()protected StringreadString()voidseek(long pos)voidsetReader(ImageInputStream reader)This sets the reader to use to retrieve the underlying bytes to process.-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.j9ddr.corereaders.ICore
close, getAddressSpaces, getDumpFormat, getPlatform, getProperties, isTruncated
-
-
-
-
Field Detail
-
_fileReader
protected ImageInputStream _fileReader
-
_memoryRanges
protected Collection<? extends IMemorySource> _memoryRanges
-
coreFile
protected File coreFile
-
-
Method Detail
-
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)
-
-