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
IValueReaderreadValue in interface IValueReaderoffset - the offset to start read from. Will be moved to the end of the parsed datatimestamp - the timestamp of the object to readInvalidJfrFileExceptionpublic java.lang.String readElement(byte[] bytes,
Offset offset)
throws InvalidJfrFileException
IArrayElementParserreadElement 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 dataInvalidJfrFileExceptionpublic static java.lang.String readString(byte[] bytes,
Offset offset)
throws InvalidJfrFileException
InvalidJfrFileExceptionprivate static int readUnsignedShort(byte[] bytes,
int offset)
public java.lang.String[] createArray(int length)
IArrayElementParsercreateArray in interface IArrayElementParser<java.lang.String>length - the length of the array to createpublic ContentType<?> getValueType()
getValueType in interface IValueReader