final class UTFStringParser extends java.lang.Object implements IArrayElementParser<java.lang.String>, IValueReader
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CHARSET |
static UTFStringParser |
INSTANCE |
Constructor and Description |
---|
UTFStringParser() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
createArray(int length)
Creates an array
|
ContentType<?> |
getValueType() |
java.lang.String |
readElement(byte[] bytes,
Offset offset)
Reads an objects from a byte array starting at a given offset.
|
static java.lang.String |
readString(byte[] bytes,
Offset offset) |
private static int |
readUnsignedShort(byte[] bytes,
int offset) |
java.lang.Object |
readValue(byte[] bytes,
Offset offset,
long timestamp)
Reads an objects from a byte array starting at a given offset.
|
private static final java.lang.String CHARSET
public static final UTFStringParser INSTANCE
public java.lang.Object readValue(byte[] bytes, Offset offset, long timestamp) throws InvalidJfrFileException
IValueReader
readValue
in interface IValueReader
offset
- the offset to start read from. Will be moved to the end of the parsed datatimestamp
- the timestamp of the object to readInvalidJfrFileException
public java.lang.String readElement(byte[] bytes, Offset offset) throws InvalidJfrFileException
IArrayElementParser
readElement
in interface IArrayElementParser<java.lang.String>
bytes
- the data to read the element fromoffset
- the offset to start read from. Will be moved to the end of the parsed dataInvalidJfrFileException
public static java.lang.String readString(byte[] bytes, Offset offset) throws InvalidJfrFileException
InvalidJfrFileException
private static int readUnsignedShort(byte[] bytes, int offset)
public java.lang.String[] createArray(int length)
IArrayElementParser
createArray
in interface IArrayElementParser<java.lang.String>
length
- the length of the array to createpublic ContentType<?> getValueType()
getValueType
in interface IValueReader