public interface ByteStringParser extends BytesCommon
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
asString()
Dump the contents of Bytes as a CharSequence
|
void |
asString(Appendable appendable)
Dump the contents of this Bytes as text in the Appendable.
|
Boolean |
parseBoolean(StopCharTester tester)
Return true or false, or null if it could not be detected
as true or false.
|
MutableDecimal |
parseDecimal(MutableDecimal decimal) |
double |
parseDouble() |
<E extends Enum<E>> |
parseEnum(Class<E> eClass,
StopCharTester tester) |
long |
parseLong() |
long |
parseLong(int base) |
String |
parseUtf8(StopCharTester tester) |
void |
parseUtf8(StringBuilder builder,
StopCharTester tester)
Populate a StringBuilder with the UTF encoded text until the end.
|
int |
readUnsignedByteOrThrow() |
boolean |
selfTerminating() |
void |
selfTerminating(boolean selfTerminate)
If set to true, the end of the Bytes will be the end of any consuming String, double or long.
|
boolean |
skipTo(StopCharTester tester)
Wind from this positionAddr to the end of the field
|
boolean |
stepBackAndSkipTo(StopCharTester tester)
Make sure we just read a stop character
|
alignPositionAddr, byteOrder, capacity, checkEndOfBuffer, clear, finish, flip, inputStream, isFinished, limit, limit, load, objectSerializer, outputStream, position, position, remaining, slice, slice, sliceAsByteBuffer, toDebugString, toDebugString, toHexString, toStringvoid selfTerminating(boolean selfTerminate)
selfTerminate - if true, the end of the Buffer is silent.boolean selfTerminating()
int readUnsignedByteOrThrow()
throws BufferUnderflowException
BufferUnderflowException - if the end is reached and selfTerminating is false.Boolean parseBoolean(@NotNull StopCharTester tester) throws BufferUnderflowException
false: f, false, n, no, 0
true: t, true, y, yes, 1
tester - to detect the end of the text.BufferUnderflowExceptionvoid parseUtf8(@NotNull StringBuilder builder, @NotNull StopCharTester tester) throws BufferUnderflowException
builder - to zeroOut and append to.tester - to detect when to stop.BufferUnderflowException@NotNull String parseUtf8(@NotNull StopCharTester tester) throws BufferUnderflowException
BufferUnderflowException@Nullable <E extends Enum<E>> E parseEnum(@NotNull Class<E> eClass, @NotNull StopCharTester tester) throws BufferUnderflowException
BufferUnderflowException@NotNull MutableDecimal parseDecimal(@NotNull MutableDecimal decimal) throws BufferUnderflowException
BufferUnderflowExceptionlong parseLong()
throws BufferUnderflowException
BufferUnderflowExceptionlong parseLong(int base)
throws BufferUnderflowException
base - to use.BufferUnderflowExceptiondouble parseDouble()
throws BufferUnderflowException
BufferUnderflowExceptionboolean stepBackAndSkipTo(@NotNull StopCharTester tester)
tester - to stop atboolean skipTo(@NotNull StopCharTester tester)
tester - to stop atvoid asString(Appendable appendable)
appendable - to append toCharSequence asString()
Copyright © 2019. All rights reserved.