final class StringReader extends java.lang.Object implements IValueReader
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CHARSET |
static StringReader |
INSTANCE |
private static int |
STRING_ELEMENT_SIZE |
private static int |
UNREASONABLE_STRING_LENGTH |
Constructor and Description |
---|
StringReader() |
Modifier and Type | Method and Description |
---|---|
ContentType<?> |
getValueType() |
static java.lang.String |
readString(byte[] data,
Offset offset) |
private static int |
readStringByteCount(byte[] data,
Offset offset) |
java.lang.Object |
readValue(byte[] data,
Offset offset,
long timestamp)
Reads an objects from a byte array starting at a given offset.
|
public static final StringReader INSTANCE
private static final int STRING_ELEMENT_SIZE
private static final java.lang.String CHARSET
private static final int UNREASONABLE_STRING_LENGTH
public java.lang.Object readValue(byte[] data, 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 static java.lang.String readString(byte[] data, Offset offset) throws InvalidJfrFileException
InvalidJfrFileException
private static int readStringByteCount(byte[] data, Offset offset) throws InvalidJfrFileException
InvalidJfrFileException
public ContentType<?> getValueType()
getValueType
in interface IValueReader