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 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,
     String messageString)  | 
static Message | 
parse(MessageFactory messageFactory,
     DataDictionary dataDictionary,
     String messageString,
     boolean validateChecksum)
Utility method for parsing a message. 
 | 
static Message | 
parse(Session session,
     String messageString)
NOTE: This method is intended for internal use. 
 | 
static ApplVerID | 
toApplVerID(String beginString)
Convert a begin string to an ApplVerID 
 | 
static String | 
toBeginString(ApplVerID applVerID)
Convert an ApplVerID to a "begin string" 
 | 
public static Message parse(MessageFactory messageFactory, DataDictionary dataDictionary, String messageString) throws InvalidMessage
InvalidMessagepublic static Message parse(MessageFactory messageFactory, DataDictionary dataDictionary, String messageString, boolean validateChecksum) throws InvalidMessage
messageFactory - dataDictionary - messageString - InvalidMessagepublic static Message parse(Session session, String messageString) throws InvalidMessage
session - the Session that will process the messagemessageString - InvalidMessagepublic static boolean isAdminMessage(String msgType)
public static boolean isHeartbeat(String message)
public static boolean isLogon(String message)
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 © 2021. All rights reserved.