public class TextWire extends AbstractWire implements Wire
WireIn.HeaderTypeMarshallableOut.Padding| Modifier and Type | Field and Description |
|---|---|
static net.openhft.chronicle.bytes.BytesStore |
BINARY |
protected long |
lineStart |
static net.openhft.chronicle.bytes.BytesStore |
TYPE |
protected net.openhft.chronicle.wire.TextWire.TextValueIn |
valueIn |
protected net.openhft.chronicle.wire.TextWire.TextValueOut |
valueOut |
ASSERTIONS, bytes, classLookup, parent, use8bitDEFAULT_SAFE_LENGTH, TRY_WRITE_HEADER_FAILED| Constructor and Description |
|---|
TextWire(net.openhft.chronicle.bytes.Bytes bytes) |
TextWire(net.openhft.chronicle.bytes.Bytes bytes,
boolean use8bit) |
| Modifier and Type | Method and Description |
|---|---|
WireOut |
addPadding(int paddingToAdd) |
boolean |
addTimeStamps() |
TextWire |
addTimeStamps(boolean addTimeStamps) |
void |
append(CharSequence cs) |
void |
append(CharSequence cs,
int offset,
int length) |
static String |
asText(Wire wire) |
net.openhft.chronicle.bytes.Bytes<?> |
bytes() |
net.openhft.chronicle.core.pool.ClassLookup |
classLookup() |
void |
classLookup(net.openhft.chronicle.core.pool.ClassLookup classLookup)
Define how classes should be looked up.
|
void |
clear()
reset the state of the current wire for reuse.
|
protected void |
consumeDocumentStart() |
void |
consumePadding() |
void |
consumePadding(int commas) |
void |
consumeWhiteSpace() |
void |
copyTo(WireOut wire) |
protected net.openhft.chronicle.wire.TextWire.TextValueIn |
createValueIn() |
protected net.openhft.chronicle.wire.TextWire.TextValueOut |
createValueOut() |
WireOut |
dropDefault(boolean dropDefault) |
void |
endEvent() |
protected void |
escape0(CharSequence s,
net.openhft.chronicle.wire.Quotes quotes) |
static TextWire |
from(String text) |
static TextWire |
fromFile(String name) |
protected net.openhft.chronicle.bytes.StopCharsTester |
getEscapingEndEventName() |
protected net.openhft.chronicle.bytes.StopCharTester |
getEscapingEndOfText() |
protected net.openhft.chronicle.bytes.StopCharTester |
getEscapingQuotes() |
protected net.openhft.chronicle.bytes.StopCharsTester |
getStrictEscapingEndOfText() |
ValueIn |
getValueIn()
Obtain the value in (for internal use)
|
ValueOut |
getValueOut()
Obtain the value out
|
protected void |
initReadContext() |
<T> T |
methodWriter(Class<T> tClass,
Class... additional)
Proxy an interface so each message called is written to a file for replay.
|
<T> VanillaMethodWriterBuilder<T> |
methodWriterBuilder(Class<T> tClass) |
protected net.openhft.chronicle.wire.Quotes |
needsQuotes(CharSequence s) |
net.openhft.chronicle.core.values.BooleanValue |
newBooleanReference() |
net.openhft.chronicle.core.values.IntValue |
newIntReference() |
net.openhft.chronicle.core.values.LongArrayValues |
newLongArrayReference() |
net.openhft.chronicle.core.values.LongValue |
newLongReference() |
void |
parseUntil(StringBuilder sb,
net.openhft.chronicle.bytes.StopCharsTester testers) |
void |
parseUntil(StringBuilder sb,
net.openhft.chronicle.bytes.StopCharTester testers) |
void |
parseWord(StringBuilder sb) |
protected boolean |
peekStringIgnoreCase(String source)
returns true if the next string is
str |
ValueIn |
read()
Read the field if present, or empty string if not present.
|
ValueIn |
read(StringBuilder name)
Read the field if present, or empty string if not present.
|
ValueIn |
read(WireKey key)
Read the field if present which must match the WireKey.
|
protected ValueIn |
read2(CharSequence keyName,
int keyCode,
Object defaultValue,
net.openhft.chronicle.wire.ValueInState curr,
StringBuilder sb,
CharSequence name) |
protected int |
readCode() |
Wire |
readComment(StringBuilder s) |
<K> K |
readEvent(Class<K> expectedClass)
Read a field which might be an object of any type.
|
long |
readEventNumber() |
protected StringBuilder |
readField(StringBuilder sb) |
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 |
DocumentContext |
readingDocument(long readLocation) |
String |
readingPeekYaml() |
Object |
readObject() |
void |
startEvent()
Start an event object, mostly for internal use.
|
boolean |
strict() |
TextWire |
strict(boolean strict) |
String |
toString() |
static <ACS extends Appendable & CharSequence> |
unescape(ACS sb) |
TextWire |
useBinaryDocuments() |
TextWire |
useTextDocuments() |
ValueOut |
write()
Write an empty filed marker
|
ValueOut |
write(CharSequence name) |
ValueOut |
write(WireKey key)
Write a key for wires that support fields.
|
Wire |
writeComment(CharSequence s) |
ValueOut |
writeEvent(Class expectedType,
Object eventKey) |
void |
writeObject(Object o) |
DocumentContext |
writingDocument(boolean metaData)
This will increment the headerNumber as appropriate if successful
|
bytesComment, endUse, forceNotInsideHeader, headerNumber, headerNumber, headNumberCheck, isInsideHeader, notCompleteIsNotPresent, notCompleteIsNotPresent, objectInput, objectOutput, parent, parent, pauser, pauser, readAndSetLength, readDataHeader, readFirstHeader, readMetaDataHeader, startUse, tryWriteHeader, updateFirstHeader, updateHeader, writeEndOfWire, writeFirstHeader, writeHeaderOfUnknownLengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitheaderNumberasText, hasMore, isEmpty, isNotEmptyAfterPadding, objectInput, rawReadData, read, readAlignTo, readAllAsMap, readAndSetLength, readDataHeader, readDataHeader, readDocument, readDocument, readEventName, readFirstHeader, readMetaDataHeadermethodReader, methodReaderBuilder, readBytes, readBytes, readDocument, readMap, readText, readTextobjectOutput, padToCacheAlign, tryWriteHeader, updateFirstHeader, updateHeader, writeAlignTo, writeAllAsMap, writeDocument, writeEndOfWire, writeEventId, writeEventName, writeEventName, writeFirstHeader, writeHeader, writeHeaderOfUnknownLength, writeHeaderOfUnknownLength, writeNotCompleteDocument, writingDocumentbytesComment, endUse, headerNumber, newTwoLongReference, notCompleteIsNotPresent, notCompleteIsNotPresent, parent, parent, pauser, pauser, startUsemethodWriter, padToCacheAlignMode, recordHistory, writeBytes, writeDocument, writeDocument, writeMap, writeMessage, writeTextpublic static final net.openhft.chronicle.bytes.BytesStore TYPE
public static final net.openhft.chronicle.bytes.BytesStore BINARY
protected final net.openhft.chronicle.wire.TextWire.TextValueOut valueOut
protected final net.openhft.chronicle.wire.TextWire.TextValueIn valueIn
protected long lineStart
public TextWire(@NotNull
net.openhft.chronicle.bytes.Bytes bytes,
boolean use8bit)
public TextWire(@NotNull
net.openhft.chronicle.bytes.Bytes bytes)
@NotNull public static TextWire fromFile(String name) throws IOException
fromFile in interface WireIOExceptionpublic static <ACS extends Appendable & CharSequence> void unescape(@NotNull ACS sb)
public boolean strict()
public TextWire strict(boolean strict)
public boolean addTimeStamps()
public TextWire addTimeStamps(boolean addTimeStamps)
@NotNull
public <T> T methodWriter(@NotNull
Class<T> tClass,
Class... additional)
MarshallableOutmethodWriter in interface MarshallableOuttClass - primary interfaceadditional - any additional interfaces@NotNull public <T> VanillaMethodWriterBuilder<T> methodWriterBuilder(@NotNull Class<T> tClass)
methodWriterBuilder in interface MarshallableOutpublic void classLookup(net.openhft.chronicle.core.pool.ClassLookup classLookup)
WireCommonclassLookup in interface WireCommonclassLookup in class AbstractWireclassLookup - to usepublic net.openhft.chronicle.core.pool.ClassLookup classLookup()
classLookup in interface WireCommonclassLookup in class AbstractWire@NotNull public DocumentContext writingDocument(boolean metaData)
WireOutwritingDocument in interface MarshallableOutwritingDocument in interface WireOutmetaData - if true the document context will be used for writing meta data,
otherwise data@NotNull public DocumentContext readingDocument()
WireInWireIn.readDocument(net.openhft.chronicle.wire.ReadMarshallable,
net.openhft.chronicle.wire.ReadMarshallable) but with out the use of a lambda expressionreadingDocument in interface MarshallableInreadingDocument in interface WireInprotected void initReadContext()
@NotNull public TextWire useBinaryDocuments()
@NotNull public TextWire useTextDocuments()
@NotNull public DocumentContext readingDocument(long readLocation)
readingDocument in interface WireIn@NotNull protected net.openhft.chronicle.wire.TextWire.TextValueOut createValueOut()
@NotNull protected net.openhft.chronicle.wire.TextWire.TextValueIn createValueIn()
public long readEventNumber()
readEventNumber in interface WireInreadEventNumber in class AbstractWire@NotNull public ValueIn read()
WireIn@NotNull protected StringBuilder readField(@NotNull StringBuilder sb)
@Nullable
public <K> K readEvent(@NotNull
Class<K> expectedClass)
WireIn@NotNull protected net.openhft.chronicle.bytes.StopCharTester getEscapingEndOfText()
@NotNull protected net.openhft.chronicle.bytes.StopCharsTester getStrictEscapingEndOfText()
@NotNull protected net.openhft.chronicle.bytes.StopCharsTester getEscapingEndEventName()
@Nullable protected net.openhft.chronicle.bytes.StopCharTester getEscapingQuotes()
public void consumePadding()
consumePadding in interface WireIn@NotNull public String readingPeekYaml()
readingPeekYaml in interface WireInpublic void consumePadding(int commas)
protected void consumeDocumentStart()
protected boolean peekStringIgnoreCase(@NotNull
String source)
strsource - stringprotected int readCode()
@NotNull public ValueIn read(@NotNull WireKey key)
WireInprotected ValueIn read2(CharSequence keyName, int keyCode, Object defaultValue, @NotNull net.openhft.chronicle.wire.ValueInState curr, @NotNull StringBuilder sb, @NotNull CharSequence name)
@NotNull public ValueIn read(@NotNull StringBuilder name)
WireIn@NotNull public ValueIn getValueIn()
WireIngetValueIn in interface WireIn@NotNull public Wire readComment(@NotNull StringBuilder s)
readComment in interface WireInpublic void consumeWhiteSpace()
public void clear()
WireCommonclear in interface WireCommonclear in interface WireInclear in interface WireOutclear in class AbstractWire@NotNull public net.openhft.chronicle.bytes.Bytes<?> bytes()
bytes in interface WireCommonbytes in class AbstractWire@NotNull public ValueOut write()
WireOut@NotNull public ValueOut write(@NotNull WireKey key)
WireOut@NotNull public ValueOut write(@NotNull CharSequence name)
public ValueOut writeEvent(Class expectedType, Object eventKey)
writeEvent in interface WireOut@NotNull public WireOut dropDefault(boolean dropDefault)
dropDefault in interface WireOut@NotNull public ValueOut getValueOut()
WireOutgetValueOut in interface WireOut@NotNull public Wire writeComment(@NotNull CharSequence s)
writeComment in interface WireOut@NotNull public WireOut addPadding(int paddingToAdd)
addPadding in interface WireOutprotected void escape0(@NotNull
CharSequence s,
@NotNull
net.openhft.chronicle.wire.Quotes quotes)
@NotNull protected net.openhft.chronicle.wire.Quotes needsQuotes(@NotNull CharSequence s)
@NotNull public net.openhft.chronicle.core.values.LongValue newLongReference()
newLongReference in interface WireCommon@NotNull public net.openhft.chronicle.core.values.BooleanValue newBooleanReference()
newBooleanReference in interface WireCommon@NotNull public net.openhft.chronicle.core.values.IntValue newIntReference()
newIntReference in interface WireCommon@NotNull public net.openhft.chronicle.core.values.LongArrayValues newLongArrayReference()
newLongArrayReference in interface WireCommonpublic void parseWord(@NotNull
StringBuilder sb)
public void parseUntil(@NotNull
StringBuilder sb,
@NotNull
net.openhft.chronicle.bytes.StopCharTester testers)
public void parseUntil(@NotNull
StringBuilder sb,
@NotNull
net.openhft.chronicle.bytes.StopCharsTester testers)
public void append(@NotNull
CharSequence cs)
public void append(@NotNull
CharSequence cs,
int offset,
int length)
@Nullable public Object readObject()
public void writeObject(Object o)
public void startEvent()
WireOutstartEvent in interface WireOutCopyright © 2018. All rights reserved.