public class Decoder extends Coder
Constructor and Description |
---|
Decoder(InputStream templateStream,
FastVersion fastVersion,
Version fixVersion)
Constructor.
|
Decoder(InputStream templateStream,
FastVersion fastVersion,
Version fixVersion,
boolean codeEachMessageIndependently)
Constructor.
|
Decoder(InputStream templateStream,
Version fixVersion)
Constructor.
|
Decoder(InputStream templateStream,
Version fixVersion,
boolean codeEachMessageIndependently)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Message |
decode(byte[] buffer)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
Message |
decode(byte[] buffer,
int offset)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
Message |
decode(byte[] buffer,
int offset,
int count)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
Message |
decode(ByteBuffer buffer)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
Message |
decode(ByteBuffer buffer,
int offset)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
void |
decode(DecodeResult result,
byte[] buffer)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
void |
decode(DecodeResult result,
byte[] buffer,
int offset)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
void |
decode(DecodeResult result,
byte[] buffer,
int offset,
int count)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
void |
decode(DecodeResult result,
ByteBuffer buffer)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
void |
decode(DecodeResult result,
ByteBuffer buffer,
int offset)
Decodes the given FAST stream chunk into the corresponding FIX Message.
|
static DecodedValue<byte[]> |
decodeByteVector(byte[] buffer,
int offset)
Decodes FAST non-nullable byte vector value.
|
static DecodedValue<byte[]> |
decodeByteVector(byte[] buffer,
int offset,
int count)
Decodes FAST non-nullable byte vector value.
|
static DecodedValue<Integer> |
decodeInt32(byte[] buffer,
int offset)
Decodes FAST non-nullable Int32 value.
|
static DecodedValue<Integer> |
decodeInt32(byte[] buffer,
int offset,
int count)
Decodes FAST non-nullable Int32 value.
|
static DecodedValue<UnsignedInteger> |
decodeUInt32(byte[] buffer,
int offset)
Decodes FAST non-nullable uInt32 value.
|
static DecodedValue<UnsignedInteger> |
decodeUInt32(byte[] buffer,
int offset,
int count)
Decodes FAST non-nullable uInt32 value.
|
FixMessageFactory |
getFixMessageFactory()
Returns message factory to use for creating decoded FIX message instance.
|
int |
getMaximumNumberOfRepeatingGroupEntries()
Returns maximum allowed number of repeating group entries.
|
void |
setFixMessageFactory(FixMessageFactory messageFactory)
Sets message factory to use for creating decoded FIX message instance.
|
void |
setMaximumNumberOfRepeatingGroupEntries(int maximumNumberOfRepeatingGroupEntries)
Sets maximum allowed number of repeating group entries.
|
getFastVersion, getFixVersion, isCodeEachMessageIndependently, reset, updateMissedIdentifiers
public Decoder(InputStream templateStream, Version fixVersion)
templateStream
- input stream with the FAST template XMLfixVersion
- target FIX versionpublic Decoder(InputStream templateStream, FastVersion fastVersion, Version fixVersion)
templateStream
- input stream with the FAST template XMLfastVersion
- source FAST version, default is FastVersion.FAST_1_1
fixVersion
- target FIX versionpublic Decoder(InputStream templateStream, Version fixVersion, boolean codeEachMessageIndependently)
templateStream
- input stream with the FAST template XMLfixVersion
- target FIX versioncodeEachMessageIndependently
- option to reset the previous values dictionaries, default is truepublic Decoder(InputStream templateStream, FastVersion fastVersion, Version fixVersion, boolean codeEachMessageIndependently)
templateStream
- input stream with the FAST template XMLfastVersion
- source FAST version, default is FastVersion.FAST_1_1
fixVersion
- target FIX versioncodeEachMessageIndependently
- option to reset the previous values dictionaries, default is truepublic int getMaximumNumberOfRepeatingGroupEntries()
If the limit is exceeded then the exception is thrown. The default value is 1000.
public void setMaximumNumberOfRepeatingGroupEntries(int maximumNumberOfRepeatingGroupEntries)
maximumNumberOfRepeatingGroupEntries
- max number of repeating group entriespublic FixMessageFactory getFixMessageFactory()
public void setFixMessageFactory(FixMessageFactory messageFactory)
messageFactory
- FIX message factorypublic Message decode(ByteBuffer buffer)
buffer
- an array of bytes that contains the source FAST stream chunkFastException
- if error occurspublic Message decode(ByteBuffer buffer, int offset)
buffer
- an array of bytes that contains the source FAST stream chunkoffset
- the zero-based byte offset in buffer at which to begin decodingFastException
- if error occurspublic Message decode(byte[] buffer, int offset, int count)
buffer
- an array of bytes that contains the source FAST stream chunkoffset
- the zero-based byte offset in buffer at which to begin decodingcount
- the number of bytes to processFastException
- if error occurspublic Message decode(byte[] buffer, int offset)
buffer
- input FAST dataoffset
- the number of bytes from the beginning of the byte array to skipFastException
- if decoding failedpublic Message decode(byte[] buffer)
buffer
- an array of bytes that contains the source FAST stream chunkFastException
- if decoding failedpublic void decode(DecodeResult result, ByteBuffer buffer)
The result parameter contains the decoded message or null if message cannot be decoded due to data shortage.
result
- decode result to fillbuffer
- an array of bytes that contains the source FAST stream chunkFastException
- if error occurspublic void decode(DecodeResult result, ByteBuffer buffer, int offset)
The result parameter contains the decoded message or null if message cannot be decoded due to data shortage.
result
- decode result to fillbuffer
- an array of bytes that contains the source FAST stream chunkoffset
- the zero-based byte offset in buffer at which to begin decodingFastException
- if error occurspublic void decode(DecodeResult result, byte[] buffer, int offset, int count)
result
- decode result to fillbuffer
- an array of bytes that contains the source FAST stream chunkoffset
- the zero-based byte offset in buffer at which to begin decodingcount
- the number of bytes to processFastException
- if error occurspublic void decode(DecodeResult result, byte[] buffer, int offset)
The result parameter contains the decoded message or null if message cannot be decoded due to data shortage.
result
- decode result to fillbuffer
- input FAST dataoffset
- the number of bytes from the beginning of the byte array to skipFastException
- if decoding failedpublic void decode(DecodeResult result, byte[] buffer)
The result parameter contains the decoded message or null if message cannot be decoded due to data shortage.
result
- decode result to fillbuffer
- an array of bytes that contains the source FAST stream chunkFastException
- if decoding failedpublic static DecodedValue<Integer> decodeInt32(byte[] buffer, int offset)
buffer
- encoded dataoffset
- offset in the bufferNullPointerException
- if (buffer == null)IllegalArgumentException
- if (buffer.length == 0) || (offset < 0)
|| (offset >= buffer.length)NotEnoughInputDataException
- if the buffer has not enough data to decode an integer value.public static DecodedValue<Integer> decodeInt32(byte[] buffer, int offset, int count)
buffer
- encoded dataoffset
- offset in the buffercount
- number of bytes to useNullPointerException
- if (buffer == null)IllegalArgumentException
- if (buffer.length == 0) || (offset < 0)
|| (offset >= buffer.length) || (count + offset) >= buffer.lengthNotEnoughInputDataException
- if the specified count of bytes has not enough data to decode an integer value.public static DecodedValue<UnsignedInteger> decodeUInt32(byte[] buffer, int offset)
buffer
- encoded dataoffset
- offset in the bufferNullPointerException
- if (buffer == null)IllegalArgumentException
- if (buffer.length == 0) || (offset < 0)
|| (offset >= buffer.length) || (count + offset) >= buffer.lengthNotEnoughInputDataException
- if the buffer has not enough data to decode an integer value.public static DecodedValue<UnsignedInteger> decodeUInt32(byte[] buffer, int offset, int count)
buffer
- encoded dataoffset
- offset in the buffercount
- number of bytes to useNullPointerException
- if (buffer == null)IllegalArgumentException
- if (buffer.length == 0) || (offset < 0)
|| (offset >= buffer.length) || (count + offset) >= buffer.lengthNotEnoughInputDataException
- if the specified count of bytes has not enough data to decode an integer value.public static DecodedValue<byte[]> decodeByteVector(byte[] buffer, int offset)
buffer
- encoded dataoffset
- offset in the bufferNullPointerException
- if (buffer == null)IllegalArgumentException
- if (buffer.length == 0) || (offset < 0)
|| (offset >= buffer.length) || (count + offset) >= buffer.lengthNotEnoughInputDataException
- if the buffer has not enough data to decode a byte vector.public static DecodedValue<byte[]> decodeByteVector(byte[] buffer, int offset, int count)
buffer
- encoded dataoffset
- offset in the buffercount
- number of bytes to useNullPointerException
- if (buffer == null)IllegalArgumentException
- if (buffer.length == 0) || (offset < 0)
|| (offset >= buffer.length) || (count + offset) >= buffer.lengthNotEnoughInputDataException
- if the specified count of bytes has not enough data to decode a byte vector.Copyright © 2005–2024 Onix Solutions. All rights reserved.