public class BinaryWire extends AbstractWire implements Wire
| Modifier and Type | Class and Description |
|---|---|
protected class |
BinaryWire.BinaryValueIn |
protected class |
BinaryWire.BinaryValueOut |
protected class |
BinaryWire.FixedBinaryValueOut |
WireIn.HeaderTypeMarshallableOut.PaddingASSERTIONS, bytes, classLookup, parent, use8bitMARSHALLABLE_IN_INTERN_SIZEDEFAULT_SAFE_LENGTH, TRY_WRITE_HEADER_FAILED| Constructor and Description |
|---|
BinaryWire(net.openhft.chronicle.bytes.Bytes bytes) |
BinaryWire(net.openhft.chronicle.bytes.Bytes bytes,
boolean fixed,
boolean numericFields,
boolean fieldLess,
int compressedSize,
String compression,
boolean supportDelta) |
| Modifier and Type | Method and Description |
|---|---|
WireOut |
addPadding(int paddingToAdd) |
static BinaryWire |
binaryOnly(net.openhft.chronicle.bytes.Bytes bytes) |
void |
clear()
reset the state of the current wire for reuse.
|
void |
consumePadding() |
void |
copyOne(WireOut wire) |
void |
copyTo(WireOut wire) |
void |
endEvent() |
boolean |
fieldLess() |
protected BinaryWire.BinaryValueIn |
getBinaryValueIn() |
protected BinaryWire.FixedBinaryValueOut |
getFixedBinaryValueOut(boolean fixed) |
ValueIn |
getValueIn()
Obtain the value in (for internal use)
|
ValueOut |
getValueOut()
Obtain the value out
|
boolean |
isTextWire() |
net.openhft.chronicle.core.values.BooleanValue |
newBooleanReference() |
net.openhft.chronicle.core.values.IntValue |
newIntReference() |
net.openhft.chronicle.bytes.ref.BinaryLongArrayReference |
newLongArrayReference() |
net.openhft.chronicle.core.values.LongValue |
newLongReference() |
net.openhft.chronicle.core.values.TwoLongValue |
newTwoLongReference() |
protected int |
peekCode() |
ValueIn |
read()
Read the field if present, or empty string if not present.
|
ValueIn |
read(String fieldName) |
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 <T> ValueIn |
read2(CharSequence keyName,
int keyCode,
T defaultSource,
Function<T,Object> defaultLookup,
net.openhft.chronicle.wire.ValueInState curr,
StringBuilder sb,
CharSequence name) |
Wire |
readComment(StringBuilder s) |
<K> K |
readEvent(Class<K> expectedClass)
Read a field which might be an object of any type.
|
ValueIn |
readEventName(StringBuilder name)
Read a field, or string which is always written, even for formats which might drop the field
such as RAW.
|
long |
readEventNumber() |
protected StringBuilder |
readFieldAnchor(StringBuilder sb) |
protected StringBuilder |
readFieldNumber(CharSequence keyName,
int keyCode,
StringBuilder sb,
long fieldId) |
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()
Typicality used for debugging, this method does not progress the read position and should
only be used when inside a reading document.
|
void |
readWithLength(WireOut wire,
int len) |
void |
startEvent()
Start an event object, mostly for internal use.
|
String |
toString() |
ValueOut |
write()
Write an empty filed marker
|
ValueOut |
write(CharSequence key) |
ValueOut |
write(WireKey key)
Write a key for wires that support fields.
|
protected net.openhft.chronicle.bytes.Bytes |
writeCode(int code) |
Wire |
writeComment(CharSequence s) |
ValueOut |
writeEventId(int methodId) |
ValueOut |
writeEventName(CharSequence name) |
ValueOut |
writeEventName(WireKey key)
Always write a key.
|
DocumentContext |
writingDocument(boolean metaData)
This will increment the headerNumber as appropriate if successful
|
bytes, bytesComment, classLookup, classLookup, endUse, enterHeader, forceNotInsideHeader, headerNumber, headerNumber, headNumberCheck, isInsideHeader, notCompleteIsNotPresent, notCompleteIsNotPresent, objectInput, objectOutput, parent, parent, pauser, pauser, readAndSetLength, readDataHeader, readFirstHeader, readFirstHeader, readMetaDataHeader, startUse, updateFirstHeader, updateHeader, writeEndOfWire, writeFirstHeader, writeHeaderOfUnknownLengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfromFile, headerNumberasText, hasMore, isEmpty, isNotEmptyAfterPadding, objectInput, rawReadData, readAlignTo, readAllAsMap, readAndSetLength, readDataHeader, readDataHeader, readDocument, readDocument, readFirstHeader, readFirstHeader, readMetaDataHeadermethodReader, methodReaderBuilder, peekDocument, readBytes, readBytes, readDocument, readMap, readText, readTextdropDefault, enterHeader, objectOutput, padToCacheAlign, updateFirstHeader, updateHeader, updateHeader, writeAlignTo, writeAllAsMap, writeDocument, writeEndOfWire, writeEvent, writeFirstHeader, writeHeader, writeHeaderOfUnknownLength, writeHeaderOfUnknownLength, writeNotCompleteDocument, writingDocumentbytes, bytesComment, classLookup, classLookup, endUse, headerNumber, notCompleteIsNotPresent, notCompleteIsNotPresent, parent, parent, pauser, pauser, startUsemethodWriter, methodWriter, methodWriterBuilder, padToCacheAlignMode, recordHistory, writeBytes, writeDocument, writeDocument, writeMap, writeMessage, writeTextpublic BinaryWire(@NotNull
net.openhft.chronicle.bytes.Bytes bytes)
public BinaryWire(@NotNull
net.openhft.chronicle.bytes.Bytes bytes,
boolean fixed,
boolean numericFields,
boolean fieldLess,
int compressedSize,
String compression,
boolean supportDelta)
@NotNull public static BinaryWire binaryOnly(@NotNull net.openhft.chronicle.bytes.Bytes bytes)
@NotNull protected BinaryWire.FixedBinaryValueOut getFixedBinaryValueOut(boolean fixed)
@NotNull protected BinaryWire.BinaryValueIn getBinaryValueIn()
public void clear()
WireCommonclear in interface WireCommonclear in interface WireInclear in interface WireOutclear in class AbstractWirepublic boolean fieldLess()
@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 WireIn@NotNull public DocumentContext readingDocument(long readLocation)
readingDocument in interface WireIn@NotNull public String readingPeekYaml()
readingPeekYaml in interface WireInpublic void copyOne(@NotNull
WireOut wire)
public void readWithLength(@NotNull
WireOut wire,
int len)
@NotNull public ValueIn read()
WireIn@NotNull public ValueIn read(@NotNull WireKey key)
WireInprotected <T> ValueIn read2(CharSequence keyName, int keyCode, T defaultSource, @NotNull Function<T,Object> defaultLookup, @NotNull net.openhft.chronicle.wire.ValueInState curr, @NotNull StringBuilder sb, CharSequence name)
public long readEventNumber()
readEventNumber in interface WireInreadEventNumber in class AbstractWire@NotNull public ValueIn readEventName(@NotNull StringBuilder name)
WireInreadEventName in interface WireIn@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 WireIn@Nullable
public <K> K readEvent(@NotNull
Class<K> expectedClass)
WireInpublic void consumePadding()
consumePadding in interface WireInprotected int peekCode()
@NotNull protected StringBuilder readFieldAnchor(@NotNull StringBuilder sb)
@NotNull protected StringBuilder readFieldNumber(CharSequence keyName, int keyCode, @NotNull StringBuilder sb, long fieldId)
@NotNull public ValueOut write()
WireOut@NotNull public ValueOut writeEventName(@NotNull WireKey key)
WireOutwriteEventName in interface WireOut@NotNull public ValueOut writeEventName(@NotNull CharSequence name)
writeEventName in interface WireOutpublic ValueOut writeEventId(int methodId)
writeEventId in interface WireOutpublic void startEvent()
WireOutstartEvent in interface WireOut@NotNull public ValueOut write(@NotNull WireKey key)
WireOut@NotNull public ValueOut write(@NotNull CharSequence key)
@NotNull public ValueOut getValueOut()
WireOutgetValueOut in interface WireOut@NotNull public Wire writeComment(CharSequence s)
writeComment in interface WireOut@NotNull public WireOut addPadding(int paddingToAdd)
addPadding in interface WireOutprotected net.openhft.chronicle.bytes.Bytes writeCode(int code)
@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 WireCommonpublic boolean isTextWire()
isTextWire in interface WireCommon@NotNull public net.openhft.chronicle.core.values.TwoLongValue newTwoLongReference()
newTwoLongReference in interface WireCommon@NotNull public net.openhft.chronicle.core.values.IntValue newIntReference()
newIntReference in interface WireCommon@NotNull public net.openhft.chronicle.bytes.ref.BinaryLongArrayReference newLongArrayReference()
newLongArrayReference in interface WireCommonCopyright © 2019. All rights reserved.