BinaryQTPParserpublic class ByteArrayParser extends BinaryQTPParser
Use BinaryQTPParser instead. Note, that unlike this ByteArrayParser, you
have to specify an input to use with BinaryQTPParser using its
setInput method. The recommended choice of input is
ChunkedInput which work with a ChunkList of byte arrays that can come from a
pool.
BinaryQTPParser.CorruptedException, BinaryQTPParser.CorruptedMessageException| Modifier and Type | Field and Description |
|---|---|
protected com.devexperts.io.ByteArrayInput |
in
Deprecated.
Exposed input for backwards compatibility with code that invokes
in.setBuffer
to parse array of bytes. |
symbolReadereventTimeSequence, fieldReplacers, mixedSubscription, readEventTimeSequence, scheme, stats| Constructor and Description |
|---|
ByteArrayParser(DataScheme scheme)
Deprecated.
Use
BinaryQTPParser |
ByteArrayParser(DataScheme scheme,
boolean parseDescribe)
Deprecated.
Use
BinaryQTPParser |
| Modifier and Type | Method and Description |
|---|---|
void |
addBytes(byte[] bytes,
int offset,
int length)
Deprecated.
Adds specified bytes to the end of byte array buffer.
|
void |
ensureCapacity(int requiredCapacity)
Deprecated.
Ensures that byte array buffer has at least specified capacity.
|
byte[] |
getBuffer()
Deprecated.
Returns byte array buffer where data is stored.
|
int |
getLimit()
Deprecated.
Returns number of bytes in the buffer.
|
int |
getProcessed()
Deprecated.
Returns number of processed bytes ready to be removed.
|
protected boolean |
isSchemeKnown()
Deprecated.
|
void |
removeBytes(int n)
Deprecated.
Removes specified number of bytes from the start of the buffer.
|
void |
resetBuffer()
Deprecated.
|
void |
setInput(com.devexperts.io.BufferedInput input)
Deprecated.
Changes input to parse messages from.
|
void |
setLimit(int newLimit)
Deprecated.
Sets new value for number of bytes in the buffer.
|
doAfterMessageBody, doAfterMessageType, doBeforeMessageLength, newRecordMap, parseImpl, readRecordId, readSubscriptionTime, readSymbol, remapRecord, resetSession, resyncOnCorrupted, resyncOnParse, wrapRecordDescapplyReadAs, getRecordBufferMode, nextRecordsMessage, parse, processPending, readAs, replaceFieldIfNeeded, setEventTimeSequence, setEventTimeSequenceIfNeeded, setFieldReplacers, setMixedSubscription, setReadEventTimeSequence, setStatsprotected final com.devexperts.io.ByteArrayInput in
in.setBuffer
to parse array of bytes.public ByteArrayParser(DataScheme scheme)
BinaryQTPParserscheme - data scheme to use.public ByteArrayParser(DataScheme scheme, boolean parseDescribe)
BinaryQTPParserparseDescribe is a legacy name. Record description messages are
always parsed by this class, but parseDescribe is false,
then "schemeKnown" flag is set to true and the parser will not
report error on records without descriptions.scheme - data scheme to use.parseDescribe - parse description mode.public void setInput(com.devexperts.io.BufferedInput input)
UnsupportedOperationException.setInput in class AbstractQTPParserinput - input to parse messages from.protected boolean isSchemeKnown()
isSchemeKnown in class BinaryQTPParserpublic int getLimit()
public int getProcessed()
public byte[] getBuffer()
Note: the array instance used for buffering may change if new messages are added or previous ones are removed.
public void removeBytes(int n)
n - number of bytes to remove.IllegalArgumentException - if specified number is negative
or is larger than the number of processed bytes.public void resetBuffer()
public void addBytes(byte[] bytes,
int offset,
int length)
bytes - array to get bytes from.offset - position of the first byte in byteslength - number of bytes to add.IndexOutOfBoundsException - if copying would cause
access of data outside specified byte array bounds.public void setLimit(int newLimit)
newLimit - new value for number of bytes in the buffer.IllegalArgumentException - if specified limit is less than
the number of processed bytes or is larger than the buffer capacity.public void ensureCapacity(int requiredCapacity)
Note: the array instance used for buffering may change if new messages are added or previous ones are removed. This means that specified capacity is valid only until next operation.
requiredCapacity - capacity to ensure.Copyright © 2002–2025 Devexperts LLC. All rights reserved.