public interface FixBlock extends Iterable<Field>
| Modifier and Type | Method and Description |
|---|---|
boolean |
append(int tag,
StringBuilder builder)
Appends field value to the specified
StringBuilder. |
FixBlock |
assemble(ByteBuffer buffer)
Assembles the FIX message to the target byte buffer.
|
FixBlock |
assemble(FlatMessage flatMessage)
Assembles the FIX message to the target
FlatMessage. |
boolean |
contains(int tag)
Returns whether the field with the specified tag number is set.
|
boolean |
contains(int tag,
boolean nested)
Returns whether the field with the specified tag number is set.
|
boolean |
containsSame(int tag,
byte[] expectedValue,
int offset,
int length)
Returns whether the field corresponding to the given tag exists and have the same value.
|
boolean |
containsSame(int tag,
CharSequence expectedValue)
Returns whether the field corresponding to the given tag exists and have the same value.
|
String |
get(int tag)
Returns the field value as string.
|
boolean |
get(int tag,
ValuePtr value)
Returns field value as
ValuePtr using provided value object instance. |
BigDecimal |
getBigDecimal(int tag)
Returns the field value as
BigDecimal. |
byte[] |
getBytes(int tag)
Returns the field value as a byte array.
|
char |
getChar(int tag)
Returns the field value as character.
|
double |
getDouble(int tag)
Returns the field value as double.
|
Group |
getGroup(int tag)
Returns the repeating group.
|
boolean |
getHighResolutionTimestamp(int tag,
HighResolutionTimestamp value,
TimestampFormat format)
Returns field value as
HighResolutionTimestamp using provided value object instance and parsed using
specified TimestampFormat format. |
HighResolutionTimestamp |
getHighResolutionTimestamp(int tag,
TimestampFormat format)
Returns field value as
HighResolutionTimestamp parsed using specified TimestampFormat format. |
int |
getInteger(int tag)
Returns the field value as integer.
|
long |
getLong(int tag)
Returns the field value as long.
|
int |
getNumberOfGroups()
Returns number of repeating groups defined on the current level excluding nested repeating groups.
|
ScaledDecimal |
getScaledDecimal(int tag)
Returns field value as
ScaledDecimal. |
boolean |
getScaledDecimal(int tag,
ScaledDecimal value)
Returns field value as
ScaledDecimal using provided value object instance. |
int |
getSize()
Returns the number of tag/value pairs excluding nested repeating groups.
|
LocalDateTime |
getUTCTimestamp(int tag)
Returns field value as
LocalDateTime. |
ValuePtr |
getValuePtr(int tag)
Returns field value as
ValuePtr. |
boolean |
hasFlag(int tag)
Returns the flag value.
|
boolean |
hasGroup(int tag)
Returns whether repeating group belongs to the fix block and actually exists.
|
Iterator<Group> |
iteratorOverGroups()
Returns an iterator over groups of the current level excludes nested repeating groups.
|
boolean |
remove(int tag)
Removes the field with the specified tag number.
|
FixBlock |
set(int tag,
BigDecimal value)
Sets the field value as
BigDecimal using provided value object instance. |
FixBlock |
set(int tag,
byte[] buffer)
Sets the field value.
|
FixBlock |
set(int tag,
byte[] buffer,
int valueLength)
Sets the field value.
|
FixBlock |
set(int tag,
byte[] buffer,
int valueOffset,
int valueLength)
Sets the field value.
|
FixBlock |
set(int tag,
ByteBuffer buffer)
Sets
ByteBuffer field value. |
FixBlock |
set(int tag,
char value)
Sets the field value as character.
|
FixBlock |
set(int tag,
CharSequence value)
Sets the field value as string.
|
FixBlock |
set(int tag,
double value)
Sets the double field value.
|
FixBlock |
set(int tag,
double value,
int precision)
Sets the field value as double.
|
FixBlock |
set(int tag,
HighResolutionTimestamp value,
TimestampFormat format)
Sets the field value as
HighResolutionTimestamp formatting it using specified TimestampFormat format. |
FixBlock |
set(int tag,
int value)
Sets the field value as integer.
|
FixBlock |
set(int tag,
LocalDateTime value)
Sets the field value as
LocalDateTime formatting it to timestamp. |
FixBlock |
set(int tag,
long value)
Sets the long field value.
|
FixBlock |
set(int tag,
ScaledDecimal value)
Sets
ScaledDecimal field value. |
FixBlock |
set(int tag,
ValuePtr value)
Sets
ValuePtr field value. |
FixBlock |
setFlag(int tag,
boolean value)
Sets the flag tag value - "Y" or "N".
|
FixBlock |
setGroup(Group srcGroup)
Copies an entire repeating group from one fix block to another.
|
Group |
setGroup(int tag,
int numberOfInstances)
Creates a new repeating group or changes the number of instances in the existing repeating group.
|
FixBlock |
setTimestamp(int tag,
long timeMillis)
Sets the field value as timestamp.
|
Stream<Field> |
stream()
Returns stream that contains all fields of the current level without groups.
|
Stream<Group> |
streamOverGroups()
Returns stream thta contains groups of the current level.
|
String |
toFixString()
Returns string representation of the message.
|
String |
toJson()
Returns string representation of the message in JSON format.
|
String |
toString(char delimiter)
Returns string representation of the message using specified delimiter.
|
String |
toString(char delimiter,
Message.StringFormat format)
Returns string representation of the message using specified delimiter and format.
|
String |
toString(Message.StringFormat format)
Returns string representation of the message using specified format.
|
String |
toXml()
Returns string representation of the message in pretty XML format.
|
forEach, iterator, spliteratorFixBlock assemble(FlatMessage flatMessage)
FlatMessage.flatMessage - target FlatMessageNullPointerException - if flatMessage == nullFixBlock assemble(ByteBuffer buffer)
buffer - target byte bufferNullPointerException - if buffer == nullboolean remove(int tag)
tag - field tag numbertrue if the field was found and removed, otherwise falseboolean contains(int tag)
tag - field tag numbertrue if the field is set,false if the field is not set or is not defined for this messageboolean contains(int tag,
boolean nested)
tag - field tag numbernested - true for checking nested repeating groups recursively, false for flat checkingtrue if the field is set,false if the field is not set or is not defined for this messageboolean containsSame(int tag,
CharSequence expectedValue)
tag - field tag numberexpectedValue - expected valuetrue in case exits, false otherwiseboolean containsSame(int tag,
byte[] expectedValue,
int offset,
int length)
tag - field tag numberexpectedValue - expected valueoffset - expected value offsetlength - expected value lengthtrue in case exits, false otherwisechar getChar(int tag)
contains(int).tag - field tag numberCharacter.MAX_VALUE if it is not setValueIsIncorrectException - if the value can't be parsed to intFixBlock set(int tag, char value)
tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledint getInteger(int tag)
contains(int).tag - field tag numberInteger.MAX_VALUE if it is not setValueIsIncorrectException - if the value can't be parsed to intFixBlock set(int tag, int value)
tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledlong getLong(int tag)
contains(int).tag - field tag numberLong.MAX_VALUE if it is not setValueIsIncorrectException - if the value can't be parsed to longFixBlock set(int tag, long value)
tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disableddouble getDouble(int tag)
contains(int).
tag - field tag numberDouble.NaN if it is not setValueIsIncorrectException - if the value can't be parsed to doubleFixBlock set(int tag, double value)
tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledIllegalArgumentException - if (index < 0)FixBlock set(int tag, double value, int precision)
tag - field tag numbervalue - field valueprecision - the number of digits in decimal partcontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledIllegalArgumentException - if (index < 0)BigDecimal getBigDecimal(int tag)
BigDecimal.
contains(int).tag - field tag numberBigDecimal, null if it is not setValueIsIncorrectException - if the value can't be parsed to BigDecimalFixBlock set(int tag, BigDecimal value)
BigDecimal using provided value object instance.tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledNullPointerException - if (value == null)ScaledDecimal getScaledDecimal(int tag)
ScaledDecimal.tag - field tag numbernull if it is not availableValueIsIncorrectException - if the field value can't be parsed to ScaledDecimalboolean getScaledDecimal(int tag,
ScaledDecimal value)
ScaledDecimal using provided value object instance.tag - field tag numbervalue - field valueNullPointerException - if (value == null)ValueIsIncorrectException - if the field value can't be parsed to ScaledDecimalFixBlock set(int tag, ScaledDecimal value)
ScaledDecimal field value.tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.NullPointerException - if (value == null)TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledFixBlock setTimestamp(int tag, long timeMillis)
tag - field tag numbertimeMillis - time in millisecondscontains(int) to check if the field had a value.LocalDateTime getUTCTimestamp(int tag)
LocalDateTime.tag - field tag numbernull if it is not availableValueIsIncorrectException - if the field value can't be parsed to LocalDateTimeFixBlock set(int tag, LocalDateTime value)
LocalDateTime formatting it to timestamp.tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.NullPointerException - if (value == null)TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledHighResolutionTimestamp getHighResolutionTimestamp(int tag, TimestampFormat format)
HighResolutionTimestamp parsed using specified TimestampFormat format.tag - field tag numberformat - format to be used during parsingnull if it is not availableValueIsIncorrectException - if the field value can't be parsed to HighResolutionTimestamp with
specified TimestampFormat formatboolean getHighResolutionTimestamp(int tag,
HighResolutionTimestamp value,
TimestampFormat format)
HighResolutionTimestamp using provided value object instance and parsed using
specified TimestampFormat format.tag - field tag numbervalue - field valueformat - format to be used during parsingNullPointerException - if ("value == null")ValueIsIncorrectException - if the field value can't be parsed to HighResolutionTimestamp with
specified TimestampFormat formatFixBlock set(int tag, HighResolutionTimestamp value, TimestampFormat format)
HighResolutionTimestamp formatting it using specified TimestampFormat format.tag - field tag numbervalue - field valueformat - format to be used for formattingcontains(int) to check if the field had a value.NullPointerException - if (value == null)TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledString get(int tag)
tag - field tag numbernull if it is not setFixBlock set(int tag, CharSequence value)
tag - field tag numbervalue - field valuecontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledNullPointerException - if (value == null)ValuePtr getValuePtr(int tag)
ValuePtr.
tag - field tag numberValuePtr.isSet() to check whether value is setboolean get(int tag,
ValuePtr value)
ValuePtr using provided value object instance.
tag - field tag numbervalue - pointer to pass valueFixBlock set(int tag, ValuePtr value)
ValuePtr field value.tag - field tag numbervalue - value pointercontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledNullPointerException - if (valuePtr == null)IllegalArgumentException - if !valuePtr.isSet()FixBlock set(int tag, ByteBuffer buffer)
ByteBuffer field value.tag - field tag numberbuffer - field valuecontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledNullPointerException - if (buffer == null)byte[] getBytes(int tag)
tag - field tag numbernull if it is not setFixBlock set(int tag, byte[] buffer)
tag - field tag numberbuffer - byte buffercontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledNullPointerException - if (buffer == null)FixBlock set(int tag, byte[] buffer, int valueLength)
tag - field tag numberbuffer - byte buffervalueLength - value length in the buffercontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledNullPointerException - if (buffer == null)IllegalArgumentException - (length > buffer.length or (valueLength < 0)FixBlock set(int tag, byte[] buffer, int valueOffset, int valueLength)
tag - field tag numberbuffer - byte buffervalueOffset - value offset in the buffervalueLength - value length in the buffercontains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledNullPointerException - if (buffer == null)IllegalArgumentException - (valueOffset < 0) or (valueOffset + valueLength > buffer.length)
or (valueLength < 0)boolean append(int tag,
StringBuilder builder)
StringBuilder.tag - field tag numberbuilder - string builder value of the field to be appendedtrue if the value was appended, and false otherwiseNullPointerException - if (buffer == null)boolean hasFlag(int tag)
tag - field tag numberFixBlock setFlag(int tag, boolean value)
tag - field tag numbervalue - true for "Y", false for "N"contains(int) to check if the field had a value.TagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledboolean hasGroup(int tag)
tag - tag number of the field that defines the number of instances in this repeating group (the NoXXX field)true in case repeating group belongs to the fix block and actually exists, false otherwiseGroup getGroup(int tag)
tag - tag number of the field that defines the number of instances in this repeating group (the NoXXX field)ParserException - tag number does not belong to the messageGroup setGroup(int tag, int numberOfInstances)
tag - tag number of the field that defines the number of instances in this repeating group (the NoXXX field)numberOfInstances - number of instances in the repeating groupTagNotDefinedForThisMessageTypeException - if field with the specified tag is not defined for this message
and unknown fields are disabledFixBlock setGroup(Group srcGroup)
srcGroup - source group to be copiedNullPointerException - if (srcGroup == null)int getNumberOfGroups()
int getSize()
String toJson()
String toXml()
String toFixString()
String toString(char delimiter)
Message.StringFormat.TAG_NUMBER.delimiter - delimiter to useString toString(Message.StringFormat format)
FixParserUtil.DELIM_CHAR.format - format to useNullPointerException - if (null == format)String toString(char delimiter, Message.StringFormat format)
format - format to usedelimiter - delimiter to useNullPointerException - if (null == format)Iterator<Group> iteratorOverGroups()
Stream<Field> stream()
Copyright © 2005–2025 Onix Solutions. All rights reserved.