public class MessageUtils extends Object
| Constructor and Description |
|---|
MessageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
checksum(byte[] data,
boolean isEntireMessage)
Calculates the checksum for the given data.
|
static int |
checksum(Charset charset,
String data,
boolean isEntireMessage)
Calculates the checksum for the given data.
|
static int |
checksum(String message)
Calculates the checksum for the given message
(excluding existing checksum field, if one exists).
|
static String |
getMessageType(String messageString) |
static SessionID |
getReverseSessionID(Message fixMessage) |
static SessionID |
getReverseSessionID(String messageString) |
static SessionID |
getSessionID(Message fixMessage) |
static SessionID |
getSessionID(String messageString) |
static String |
getStringField(String messageString,
int tag) |
static boolean |
isAdminMessage(String msgType) |
static boolean |
isHeartbeat(String message) |
static boolean |
isLogon(String message) |
static boolean |
isLogonMsgType(String msgType) |
static int |
length(Charset charset,
String data)
Calculates the length of the byte representation
of the given string in the given charset.
|
static Message |
parse(MessageFactory messageFactory,
DataDictionary dataDictionary,
ValidationSettings validationSettings,
String messageString) |
static Message |
parse(MessageFactory messageFactory,
DataDictionary dataDictionary,
ValidationSettings validationSettings,
String messageString,
boolean validateChecksum)
Utility method for parsing a message.
|
static ApplVerID |
toApplVerID(String beginString)
Convert a BeginString to an ApplVerID.
|
static String |
toBeginString(ApplVerID applVerID)
Convert an ApplVerID to a BeginString.
|
public static Message parse(MessageFactory messageFactory, DataDictionary dataDictionary, ValidationSettings validationSettings, String messageString) throws InvalidMessage
InvalidMessagepublic static Message parse(MessageFactory messageFactory, DataDictionary dataDictionary, ValidationSettings validationSettings, String messageString, boolean validateChecksum) throws InvalidMessage
messageFactory - dataDictionary - messageString - validateChecksum - InvalidMessagepublic static boolean isAdminMessage(String msgType)
public static boolean isHeartbeat(String message)
public static boolean isLogon(String message)
public static boolean isLogonMsgType(String msgType)
public static String getMessageType(String messageString) throws InvalidMessage
InvalidMessagepublic static String toBeginString(ApplVerID applVerID) throws QFJException
applVerID - QFJException - if conversion fails.ApplVerIDpublic static ApplVerID toApplVerID(String beginString) throws QFJException
beginString - QFJException - if conversion fails.FixVersionspublic static int checksum(byte[] data,
boolean isEntireMessage)
data - the data to calculate the checksum onisEntireMessage - specifies whether the data is an entire message;
if true, and it ends with a checksum field, that checksum
field is excluded from the current checksum calculationpublic static int checksum(Charset charset, String data, boolean isEntireMessage)
charset - the charset used in encoding the datadata - the data to calculate the checksum onisEntireMessage - specifies whether the data is an entire message;
if true, and it ends with a checksum field, that checksum
field is excluded from the current checksum calculationpublic static int checksum(String message)
global charset is used.message - the message to calculate the checksum onCopyright © 2026. All rights reserved.