Class ProducerParser
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.internal.parser.v0.ProducerParser
-
- All Implemented Interfaces:
IArrayElementParser<ProducerDescriptor>
final class ProducerParser extends java.lang.Object implements IArrayElementParser<ProducerDescriptor>
Parses a producer
-
-
Field Summary
Fields Modifier and Type Field Description private static TypedArrayParser<java.lang.String>RELATIONS_PARSER
-
Constructor Summary
Constructors Constructor Description ProducerParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProducerDescriptor[]createArray(int length)Creates an arrayProducerDescriptorreadElement(byte[] data, Offset offset)Reads an objects from a byte array starting at a given offset.
-
-
-
Field Detail
-
RELATIONS_PARSER
private static final TypedArrayParser<java.lang.String> RELATIONS_PARSER
-
-
Method Detail
-
readElement
public ProducerDescriptor readElement(byte[] data, Offset offset) throws InvalidJfrFileException
Description copied from interface:IArrayElementParserReads an objects from a byte array starting at a given offset.- Specified by:
readElementin interfaceIArrayElementParser<ProducerDescriptor>- Parameters:
data- the data to read the element fromoffset- the offset to start read from. Will be moved to the end of the parsed data- Returns:
- the parsed element
- Throws:
InvalidJfrFileException
-
createArray
public ProducerDescriptor[] createArray(int length)
Description copied from interface:IArrayElementParserCreates an array- Specified by:
createArrayin interfaceIArrayElementParser<ProducerDescriptor>- Parameters:
length- the length of the array to create- Returns:
-
-