- 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
_fileReader
protected Collection<? extends IMemorySource>
_memoryRanges
protected File
coreFile
-
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 protected
AbstractCoreReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkOffset(long location)
static String
format(int i)
static String
format(long l)
byte
readByte()
byte[]
readBytes(int len)
void
readFully(byte[] b)
void
readFully(byte[] buffer, int offset, int length)
int
readInt()
protected static int
readInt(byte[] data, int start)
long
readLong()
protected static long
readLong(byte[] data, int start)
short
readShort()
protected String
readString()
void
seek(long pos)
void
setReader(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)
-
-