Class TemplateField
java.lang.Object
com.ibm.j9ddr.corereaders.tdump.zebedee.util.TemplateField
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the length in bits of this fieldint
Returns the length in bytes of this fieldint
Returns the offset (in bits) of the field within the template.getName()
Returns the name of the fieldint
Returns the offset (in bytes) of the field within the template.boolean
Returns true if this is a bit field (ie the number of bits is not a multiple of 8)boolean
Returns true is this field is a pointer.long
readLong
(ImageInputStream inputStream, long address) Returns the field in long form.
-
Method Details
-
isBitField
public boolean isBitField()Returns true if this is a bit field (ie the number of bits is not a multiple of 8) -
byteLength
public int byteLength()Returns the length in bytes of this field -
bitLength
public int bitLength()Returns the length in bits of this field -
getName
Returns the name of the field -
readLong
Returns the field in long form. The field must be either of type "int" or of type "pointer". For integers if the native size is less than 64 bits then a widening conversion is performed.- Parameters:
inputStream
- the ImageInputStream to read fromaddress
- the address of the start of the template (not of the field!)- Returns:
- the field converted to a long
- Throws:
IOException
- if any errors occurred on reading from the stream
-
isPointer
public boolean isPointer()Returns true is this field is a pointer. -
getOffset
public int getOffset()Returns the offset (in bytes) of the field within the template.- Returns:
- the offset of the field (rounded down for bit fields)
-
getBitOffset
public int getBitOffset()Returns the offset (in bits) of the field within the template.- Returns:
- the offset of the field
-