public interface WireIn extends WireCommon, MarshallableIn
Created by peter.lawrey on 12/01/15.
Modifier and Type | Interface and Description |
---|---|
static class |
WireIn.HeaderType |
Modifier and Type | Method and Description |
---|---|
default CharSequence |
asText() |
void |
clear()
reset the state of the current wire for reuse.
|
void |
consumePadding() |
void |
copyTo(WireOut wire) |
ValueIn |
getValueIn()
Obtain the value in (for internal use)
|
default boolean |
hasMore()
This consumes any padding before checking if readRemaining() > 0
|
default boolean |
isEmpty() |
default boolean |
isNotEmptyAfterPadding()
This consumes any padding before checking if readRemaining() > 0
|
ObjectInput |
objectInput() |
default void |
rawReadData(ReadMarshallable marshallable) |
ValueIn |
read()
Read the field if present, or empty string if not present.
|
default 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.
|
default WireIn |
readAlignTo(int alignment) |
default <K,V> Map<K,V> |
readAllAsMap(Class<K> kClass,
Class<V> vClass,
Map<K,V> map) |
void |
readAndSetLength(long position) |
WireIn |
readComment(StringBuilder sb) |
default boolean |
readDataHeader()
Consume a header if one is available.
|
WireIn.HeaderType |
readDataHeader(boolean includeMetaData) |
default boolean |
readDocument(long position,
ReadMarshallable metaDataConsumer,
ReadMarshallable dataConsumer) |
default boolean |
readDocument(ReadMarshallable metaDataConsumer,
ReadMarshallable dataConsumer) |
<K> K |
readEvent(Class<K> expectedClass)
Read a field which might be an object of any type.
|
default ValueIn |
readEventName(StringBuilder name)
Read a field, or string which is always written, even for formats which might drop the field
such as RAW.
|
void |
readFirstHeader(long timeout,
TimeUnit timeUnit) |
DocumentContext |
readingDocument()
equivalent to
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() |
void |
readMetaDataHeader() |
bytes, classLookup, classLookup, endUse, headerNumber, headerNumber, newIntReference, newLongArrayReference, newLongReference, notCompleteIsNotPresent, notCompleteIsNotPresent, parent, parent, pauser, pauser, startUse
methodReader, methodReaderBuilder, readBytes, readBytes, readDocument, readMap, readText, readText
@NotNull default <K,V> Map<K,V> readAllAsMap(Class<K> kClass, @NotNull Class<V> vClass, @NotNull Map<K,V> map)
void copyTo(@NotNull WireOut wire)
@NotNull ValueIn read()
@NotNull ValueIn read(@NotNull WireKey key)
@NotNull default ValueIn readEventName(@NotNull StringBuilder name)
@NotNull ValueIn read(@NotNull StringBuilder name)
@Nullable <K> K readEvent(Class<K> expectedClass)
expectedClass
- to use as a hint, or Object.class if no hint available.@NotNull ValueIn getValueIn()
ObjectInput objectInput()
@NotNull WireIn readComment(@NotNull StringBuilder sb)
void clear()
WireCommon
clear
in interface WireCommon
default boolean hasMore()
NOTE: This method only works inside a document. Call it just before a document and it won't know not to read the read in case there is padding.
default boolean isNotEmptyAfterPadding()
NOTE: This method only works inside a document. Call it just before a document and it won't know not to read the read in case there is padding.
default boolean isEmpty()
@NotNull default WireIn readAlignTo(int alignment)
default boolean readDocument(@Nullable ReadMarshallable metaDataConsumer, @Nullable ReadMarshallable dataConsumer)
default boolean readDocument(long position, @Nullable ReadMarshallable metaDataConsumer, @Nullable ReadMarshallable dataConsumer)
default void rawReadData(@NotNull ReadMarshallable marshallable)
@NotNull DocumentContext readingDocument()
readDocument(net.openhft.chronicle.wire.ReadMarshallable,
net.openhft.chronicle.wire.ReadMarshallable)
but with out the use of a lambda expressionreadingDocument
in interface MarshallableIn
DocumentContext readingDocument(long readLocation)
void consumePadding()
default boolean readDataHeader() throws EOFException
EOFException
- if the end of wire marker is reached.@NotNull WireIn.HeaderType readDataHeader(boolean includeMetaData) throws EOFException
EOFException
void readAndSetLength(long position)
void readFirstHeader(long timeout, TimeUnit timeUnit) throws TimeoutException, StreamCorruptedException
void readMetaDataHeader()
@Nullable default CharSequence asText()
String readingPeekYaml()
Copyright © 2017. All rights reserved.