Class ConstantReader
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.internal.parser.v0.ConstantReader
-
- All Implemented Interfaces:
IValueReader
class ConstantReader extends java.lang.Object implements IValueReader
-
-
Field Summary
Fields Modifier and Type Field Description private DataTypekeyTypeprivate ConstantMappool
-
Constructor Summary
Constructors Constructor Description ConstantReader(ConstantMap pool, DataType keyType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentType<?>getValueType()java.lang.ObjectreadValue(byte[] bytes, Offset offset, long timestamp)Reads an objects from a byte array starting at a given offset.
-
-
-
Field Detail
-
pool
private final ConstantMap pool
-
keyType
private final DataType keyType
-
-
Constructor Detail
-
ConstantReader
public ConstantReader(ConstantMap pool, DataType keyType)
-
-
Method Detail
-
readValue
public java.lang.Object readValue(byte[] bytes, Offset offset, long timestamp) throws InvalidJfrFileExceptionDescription copied from interface:IValueReaderReads an objects from a byte array starting at a given offset.- Specified by:
readValuein interfaceIValueReaderoffset- the offset to start read from. Will be moved to the end of the parsed datatimestamp- the timestamp of the object to read- Returns:
- the parsed object
- Throws:
InvalidJfrFileException
-
getValueType
public ContentType<?> getValueType()
- Specified by:
getValueTypein interfaceIValueReader- Returns:
- the content type of the created objects
-
-