public class QueryWire extends TextWire
"a=1&b=2".
The bytes are treated as UTF-8 text and are not percent-decoded.
Extends TextWire and supplies QueryValueIn and
QueryValueOut for query specific value handling.TextWire.TextValueInWireIn.HeaderTypeWireOut.EndOfWireBINARY, lineStart, readContext, TYPE_STR, writeContextsb, TYPEbytes, classLookup, commentListener, DEFAULT_USE_PADDING, parent, use8bitMARSHALLABLE_IN_INTERN_SIZE| Constructor and Description |
|---|
QueryWire(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
Creates a
QueryWire over the supplied bytes which must contain a query
string, for example "key=val&flag=true". |
| Modifier and Type | Method and Description |
|---|---|
@NotNull QueryWire |
addPadding(int paddingToAdd)
Adds padding to the wire.
|
void |
consumePadding()
Skips any leading whitespace from the current read position.
|
protected @NotNull TextWire.TextValueIn |
createValueIn()
Returns a reader that parses query parameter values.
|
protected @NotNull net.openhft.chronicle.wire.QueryWire.QueryValueOut |
createValueOut()
Returns a writer that formats values as query parameters.
|
@NotNull ValueIn |
getValueIn()
Obtains the value associated with a field or event for more advanced use cases.
|
@NotNull ValueOut |
getValueOut()
Retrieves the interface for defining the output of a value
that will be written to the stream.
|
@NotNull net.openhft.chronicle.core.values.IntArrayValues |
newIntArrayReference()
Unsupported for query strings.
|
@NotNull net.openhft.chronicle.core.values.IntValue |
newIntReference()
Unsupported for query strings.
|
@NotNull net.openhft.chronicle.bytes.ref.BinaryLongArrayReference |
newLongArrayReference()
Unsupported for query strings.
|
@NotNull net.openhft.chronicle.core.values.LongValue |
newLongReference()
Unsupported for query strings.
|
protected @NotNull StringBuilder |
readField(@NotNull StringBuilder sb)
Reads the next field name into
sb stopping at '=' or '&'. |
@NotNull ValueOut |
write()
Query strings do not support unnamed writes.
|
@NotNull ValueOut |
write(@NotNull CharSequence name)
Starts a query parameter using the supplied key.
|
@NotNull ValueOut |
write(@NotNull WireKey key)
Starts a query parameter using the supplied key.
|
@NotNull QueryWire |
writeComment(@NotNull CharSequence s)
Writes a comment to the wire.
|
acquireWritingDocument, asText, classLookup, classLookup, clear, consumeDocumentStart, consumePadding, consumeWhiteSpace, copyTo, defaultKeyClass, from, fromFile, getEscapingEndEventName, getEscapingEndOfText, getEscapingQuotes, getStrictEscapingEndOfText, hasMetaDataPrefix, initReadContext, isBinary, load, methodReaderBuilder, methodWriter, methodWriterBuilder, newBooleanReference, parseUntil, parseUntil, parseWord, peekStringIgnoreCase, read, read, read, read2, read2, readCode, readComment, readEvent, readEventNumber, readingDocument, readingDocument, readingPeekYaml, readObject, reset, rollbackIfNotComplete, strict, strict, to8bitString, toString, toUtf8String, unescape, useBinaryDocuments, useSelfDescribingMessage, useTextDocuments, writingDocument, writingIsCompleteacquireStringBuilder, addTimeStamps, addTimeStamps, append, append, appendU4, bytes, dropDefault, escape0, needsQuotes, trimFirstCurly, trimFirstCurly, writeEndEvent, writeEvent, writeObject, writeStartEventbytesComment, commentListener, endOfWire, enterHeader, forceNotInsideHeader, generateTuples, generateTuples, 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, waitnewYamlWireOnHeapendEvent, 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, methodWriterBuilder, recordHistory, writeBytes, writeDocument, writeDocument, writeMap, writeMessage, writeMessage, writeTextpublic QueryWire(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
QueryWire over the supplied bytes which must contain a query
string, for example "key=val&flag=true".bytes - buffer holding the UTF-8 query text@NotNull protected @NotNull net.openhft.chronicle.wire.QueryWire.QueryValueOut createValueOut()
createValueOut in class YamlWireOut<TextWire>@NotNull protected @NotNull TextWire.TextValueIn createValueIn()
createValueIn in class TextWire@NotNull protected @NotNull StringBuilder readField(@NotNull @NotNull StringBuilder sb)
sb stopping at '=' or '&'.
If an '&' has been consumed it is rewound.public void consumePadding()
consumePadding in interface WireInconsumePadding in class TextWire@NotNull public @NotNull ValueOut write()
write in interface WireOutwrite in class YamlWireOut<TextWire>@NotNull public @NotNull ValueOut write(@NotNull @NotNull WireKey key)
write in interface WireOutwrite in class YamlWireOut<TextWire>key - The WireKey to write to the stream.@NotNull public @NotNull ValueOut write(@NotNull @NotNull CharSequence name)
write in interface WireOutwrite in class YamlWireOut<TextWire>name - The CharSequence key to write to the stream.@NotNull public @NotNull ValueOut getValueOut()
WireOutgetValueOut in interface WireOutgetValueOut in class YamlWireOut<TextWire>@NotNull public @NotNull ValueIn getValueIn()
WireInWireIn.readEvent(Class).getValueIn in interface WireIngetValueIn in class TextWireValueIn instance.@NotNull public @NotNull QueryWire writeComment(@NotNull @NotNull CharSequence s)
WireOutwriteComment in interface WireOutwriteComment in class YamlWireOut<TextWire>s - The comment to be written to the stream.@NotNull public @NotNull QueryWire addPadding(int paddingToAdd)
WireOutaddPadding in interface WireOutaddPadding in class YamlWireOut<TextWire>paddingToAdd - The amount of padding to add.@NotNull public @NotNull net.openhft.chronicle.core.values.LongValue newLongReference()
newLongReference in interface WireCommonnewLongReference in class TextWireLongValue@NotNull public @NotNull net.openhft.chronicle.core.values.IntValue newIntReference()
newIntReference in interface WireCommonnewIntReference in class TextWireIntValue.@NotNull public @NotNull net.openhft.chronicle.bytes.ref.BinaryLongArrayReference newLongArrayReference()
newLongArrayReference in interface WireCommonnewLongArrayReference in class TextWireLongArrayValues@NotNull public @NotNull net.openhft.chronicle.core.values.IntArrayValues newIntArrayReference()
newIntArrayReference in interface WireCommonnewIntArrayReference in class TextWireIntArrayValuesCopyright © 2026 Chronicle Software Ltd. All rights reserved.