public class TextWire extends YamlWireOut<TextWire>
| Modifier and Type | Class and Description |
|---|---|
class |
TextWire.TextValueIn |
WireIn.HeaderTypeWireOut.EndOfWire| Modifier and Type | Field and Description |
|---|---|
static net.openhft.chronicle.bytes.BytesStore |
BINARY |
protected long |
lineStart |
protected ReadDocumentContext |
readContext |
static @NotNull net.openhft.chronicle.bytes.Bytes<byte[]> |
TYPE_STR |
protected TextWire.TextValueIn |
valueIn |
protected WriteDocumentContext |
writeContext |
sb, TYPE, valueOutbytes, classLookup, commentListener, DEFAULT_USE_PADDING, parent, use8bitMARSHALLABLE_IN_INTERN_SIZE| Constructor and Description |
|---|
TextWire(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes) |
TextWire(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes,
boolean use8bit) |
| Modifier and Type | Method and Description |
|---|---|
DocumentContext |
acquireWritingDocument(boolean metaData)
Start or reuse an existing a DocumentContext, optionally call close() when done.
|
static String |
asText(@NotNull Wire wire) |
net.openhft.chronicle.core.pool.ClassLookup |
classLookup()
Returns the current
ClassLookup implementation being used for class lookup. |
void |
classLookup(net.openhft.chronicle.core.pool.ClassLookup classLookup)
Sets the
ClassLookup implementation to be used for class lookup. |
void |
clear()
Resets the state of the underlying
Bytes stored by the wire. |
protected void |
consumeDocumentStart() |
void |
consumePadding() |
void |
consumePadding(int commas) |
void |
consumeWhiteSpace() |
void |
copyTo(@NotNull WireOut wire) |
protected @NotNull TextWire.TextValueIn |
createValueIn() |
protected Class |
defaultKeyClass() |
static @NotNull TextWire |
from(@NotNull String text) |
static @NotNull TextWire |
fromFile(String name) |
protected @NotNull net.openhft.chronicle.bytes.StopCharsTester |
getEscapingEndEventName() |
protected @NotNull net.openhft.chronicle.bytes.StopCharTester |
getEscapingEndOfText() |
protected @Nullable net.openhft.chronicle.bytes.StopCharTester |
getEscapingQuotes() |
protected @NotNull net.openhft.chronicle.bytes.StopCharsTester |
getStrictEscapingEndOfText() |
@NotNull ValueIn |
getValueIn()
Obtain the value in for advanced use (typically after a call to readEvent above)
|
boolean |
hasMetaDataPrefix() |
protected void |
initReadContext() |
boolean |
isBinary()
Determine whether direct access to the underlying byte() makes sense or should it be treated as text
|
static <T> T |
load(String filename)
Loads an Object from a file
|
@NotNull VanillaMethodReaderBuilder |
methodReaderBuilder() |
<T> T |
methodWriter(@NotNull Class<T> tClass,
Class... additional)
Proxy an interface so each message called is written for replay.
|
<T> @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
methodWriterBuilder(@NotNull Class<T> tClass)
Return a builder for a proxy an interface so each message called is written for method.
|
@NotNull net.openhft.chronicle.core.values.BooleanValue |
newBooleanReference()
Creates and returns a new
BooleanValue. |
@NotNull net.openhft.chronicle.core.values.IntArrayValues |
newIntArrayReference()
Creates and returns a new
IntArrayValues. |
@NotNull net.openhft.chronicle.core.values.IntValue |
newIntReference()
Creates and returns a new
IntValue. |
@NotNull net.openhft.chronicle.core.values.LongArrayValues |
newLongArrayReference()
Creates and returns a new
LongArrayValues. |
@NotNull net.openhft.chronicle.core.values.LongValue |
newLongReference()
Creates and returns a new
LongValue. |
void |
parseUntil(@NotNull StringBuilder sb,
@NotNull net.openhft.chronicle.bytes.StopCharsTester testers) |
void |
parseUntil(@NotNull StringBuilder sb,
@NotNull net.openhft.chronicle.bytes.StopCharTester testers) |
void |
parseWord(@NotNull StringBuilder sb) |
protected boolean |
peekStringIgnoreCase(@NotNull String source)
returns
true if the next string is str |
@NotNull ValueIn |
read()
Read the field if present, or empty string if not present.
|
@NotNull ValueIn |
read(@NotNull StringBuilder name)
Read the field if present, or empty string if not present.
|
@NotNull ValueIn |
read(@NotNull WireKey key)
Read the field if present which must match the WireKey.
|
protected ValueIn |
read2(CharSequence keyName,
int keyCode,
Object defaultValue,
@NotNull net.openhft.chronicle.wire.ValueInState curr,
@NotNull StringBuilder sb,
@NotNull CharSequence name) |
protected int |
readCode() |
@NotNull Wire |
readComment(@NotNull StringBuilder s) |
<K> K |
readEvent(@NotNull Class<K> expectedClass)
Read a field which might be an object of any type.
|
long |
readEventNumber() |
protected @NotNull StringBuilder |
readField(@NotNull StringBuilder sb) |
@NotNull DocumentContext |
readingDocument()
equivalent to
WireIn.readDocument(net.openhft.chronicle.wire.ReadMarshallable,
net.openhft.chronicle.wire.ReadMarshallable) but with out the use of a lambda expression |
@NotNull DocumentContext |
readingDocument(long readLocation) |
@NotNull String |
readingPeekYaml() |
@Nullable Object |
readObject() |
void |
reset()
Reset the state of the wire
|
boolean |
strict() |
TextWire |
strict(boolean strict) |
protected @NotNull Supplier<net.openhft.chronicle.bytes.StopCharsTester> |
strictEndOfTextEscaping()
Deprecated.
|
String |
toString() |
static <ACS extends Appendable & CharSequence> |
unescape(ACS sb) |
@NotNull TextWire |
useBinaryDocuments() |
boolean |
useSelfDescribingMessage(@NotNull net.openhft.chronicle.bytes.CommonMarshallable object)
Should this wire write the object as a Marshallable or BytesMarshallable
|
@NotNull TextWire |
useTextDocuments() |
@NotNull DocumentContext |
writingDocument(boolean metaData)
Start a new DocumentContext, must always call close() when done.
|
boolean |
writingIsComplete() |
acquireStringBuilder, addPadding, addTimeStamps, addTimeStamps, append, append, appendU4, bytes, createValueOut, dropDefault, escape0, getValueOut, needsQuotes, trimFirstCurly, trimFirstCurly, write, write, write, writeComment, writeEndEvent, writeEvent, writeObject, writeStartEventbytesComment, commentListener, endOfWire, enterHeader, forceNotInsideHeader, headerNumber, headerNumber, headNumberCheck, isInsideHeader, notCompleteIsNotPresent, notCompleteIsNotPresent, objectInput, objectOutput, parent, parent, pauser, pauser, readAndSetLength, readDataHeader, readFirstHeader, readFirstHeader, readMetaDataHeader, updateFirstHeader, updateFirstHeader, updateHeader, usePadding, usePadding, writeEndOfWire, writeFirstHeaderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitnewYamlWireOnHeapasText, endEvent, hasMore, hintReadInputOrder, isEmpty, isEndEvent, isNotEmptyAfterPadding, rawReadData, read, readAlignTo, readAllAsMap, readDataHeader, readDocument, readDocument, readEventName, startEventmethodReader, readBytes, readBytes, readDocument, readMap, readText, readTextpadToCacheAlign, writeAlignTo, writeAllAsMap, writeDocument, writeEventId, writeEventId, writeEventName, writeEventName, writeNotCompleteDocument, writingDocumentnewTwoLongReferencebuilder, methodWriter, methodWriterBuilder, recordHistory, writeBytes, writeDocument, writeDocument, writeMap, writeMessage, writeMessage, writeTextpublic static final net.openhft.chronicle.bytes.BytesStore BINARY
@NotNull public static final @NotNull net.openhft.chronicle.bytes.Bytes<byte[]> TYPE_STR
protected final TextWire.TextValueIn valueIn
protected long lineStart
protected WriteDocumentContext writeContext
protected ReadDocumentContext readContext
public TextWire(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes,
boolean use8bit)
public TextWire(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
@NotNull public static @NotNull TextWire fromFile(String name) throws IOException
IOExceptionpublic static <ACS extends Appendable & CharSequence> void unescape(@NotNull ACS sb)
public static <T> T load(String filename) throws IOException, net.openhft.chronicle.core.io.InvalidMarshallableException
T - the type of the object to loadfilename - the file-path containing the objectIOException - if the file can not be found or readnet.openhft.chronicle.core.io.InvalidMarshallableExceptionpublic boolean isBinary()
WireCommonpublic boolean strict()
public TextWire strict(boolean strict)
@NotNull
public <T> T methodWriter(@NotNull
@NotNull Class<T> tClass,
Class... additional)
MarshallableOuttClass - primary interfaceadditional - any additional interfaces@NotNull
public <T> @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> methodWriterBuilder(@NotNull
@NotNull Class<T> tClass)
MarshallableOuttClass - primary interface@NotNull public @NotNull VanillaMethodReaderBuilder methodReaderBuilder()
public void classLookup(net.openhft.chronicle.core.pool.ClassLookup classLookup)
WireCommonClassLookup implementation to be used for class lookup.classLookup in interface WireCommonclassLookup in class AbstractWireclassLookup - implementation to be used for class lookup.public net.openhft.chronicle.core.pool.ClassLookup classLookup()
WireCommonClassLookup implementation being used for class lookup.classLookup in interface WireCommonclassLookup in class AbstractWireClassLookup implementation being used for class lookup@NotNull public @NotNull DocumentContext writingDocument(boolean metaData)
DocumentWrittenmetaData - if true the document context will be used for writing meta data,
otherwise datapublic DocumentContext acquireWritingDocument(boolean metaData)
DocumentWritten@NotNull public @NotNull DocumentContext readingDocument()
WireInWireIn.readDocument(net.openhft.chronicle.wire.ReadMarshallable,
net.openhft.chronicle.wire.ReadMarshallable) but with out the use of a lambda expressionprotected void initReadContext()
@NotNull public @NotNull TextWire useBinaryDocuments()
@NotNull public @NotNull TextWire useTextDocuments()
@NotNull public @NotNull DocumentContext readingDocument(long readLocation)
@NotNull protected @NotNull TextWire.TextValueIn createValueIn()
public void copyTo(@NotNull
@NotNull WireOut wire)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptionpublic long readEventNumber()
readEventNumber in interface WireInreadEventNumber in class AbstractWire@NotNull public @NotNull ValueIn read()
WireIn@NotNull protected @NotNull StringBuilder readField(@NotNull @NotNull StringBuilder sb)
@Nullable
public <K> K readEvent(@NotNull
@NotNull Class<K> expectedClass)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
WireInUse getValueIn() to read the value for this event
expectedClass - to use as a hint, or Object.class if no hint available.net.openhft.chronicle.core.io.InvalidMarshallableExceptionprotected Class defaultKeyClass()
@NotNull protected @NotNull net.openhft.chronicle.bytes.StopCharTester getEscapingEndOfText()
@NotNull protected @NotNull net.openhft.chronicle.bytes.StopCharsTester getStrictEscapingEndOfText()
@NotNull @Deprecated protected @NotNull Supplier<net.openhft.chronicle.bytes.StopCharsTester> strictEndOfTextEscaping()
@NotNull protected @NotNull net.openhft.chronicle.bytes.StopCharsTester getEscapingEndEventName()
@Nullable protected @Nullable net.openhft.chronicle.bytes.StopCharTester getEscapingQuotes()
public void consumePadding()
@NotNull public @NotNull String readingPeekYaml()
public void consumePadding(int commas)
protected void consumeDocumentStart()
protected boolean peekStringIgnoreCase(@NotNull
@NotNull String source)
true if the next string is strsource - stringprotected int readCode()
@NotNull public @NotNull ValueIn read(@NotNull @NotNull WireKey key)
WireInprotected ValueIn read2(CharSequence keyName, int keyCode, Object defaultValue, @NotNull @NotNull net.openhft.chronicle.wire.ValueInState curr, @NotNull @NotNull StringBuilder sb, @NotNull @NotNull CharSequence name)
@NotNull public @NotNull ValueIn read(@NotNull @NotNull StringBuilder name)
WireIn@NotNull public @NotNull ValueIn getValueIn()
WireIn@NotNull public @NotNull Wire readComment(@NotNull @NotNull StringBuilder s)
public void consumeWhiteSpace()
public void clear()
WireCommonBytes stored by the wire.clear in interface WireCommonclear in interface WireInclear in interface WireOutclear in class AbstractWire@NotNull public @NotNull net.openhft.chronicle.core.values.LongValue newLongReference()
WireCommonLongValue. The LongValue implementation that is
returned depends on the wire implementation.LongValue@NotNull public @NotNull net.openhft.chronicle.core.values.BooleanValue newBooleanReference()
WireCommonBooleanValue. The BooleanValue implementation that is
returned depends on the wire implementation.BooleanValue.public boolean useSelfDescribingMessage(@NotNull
@NotNull net.openhft.chronicle.bytes.CommonMarshallable object)
WireCommon@NotNull public @NotNull net.openhft.chronicle.core.values.IntValue newIntReference()
WireCommonIntValue. The IntValue implementation that is
returned depends on the wire implementation.IntValue.@NotNull public @NotNull net.openhft.chronicle.core.values.LongArrayValues newLongArrayReference()
WireCommonLongArrayValues. The LongArrayValues implementation that
is returned depends on the wire implementation.LongArrayValues@NotNull public @NotNull net.openhft.chronicle.core.values.IntArrayValues newIntArrayReference()
WireCommonIntArrayValues. The IntArrayValues implementation that
is returned depends on the wire implementation.IntArrayValuespublic void parseWord(@NotNull
@NotNull StringBuilder sb)
public void parseUntil(@NotNull
@NotNull StringBuilder sb,
@NotNull
@NotNull net.openhft.chronicle.bytes.StopCharTester testers)
public void parseUntil(@NotNull
@NotNull StringBuilder sb,
@NotNull
@NotNull net.openhft.chronicle.bytes.StopCharsTester testers)
@Nullable public @Nullable Object readObject() throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptionpublic void reset()
WireCommonpublic boolean hasMetaDataPrefix()
public boolean writingIsComplete()
Copyright © 2023. All rights reserved.