java.lang.Object
com.github.hypfvieh.util.FixUtil

public final class FixUtil extends Object
  • Felddetails

  • Methodendetails

    • getDelimiterFromFixMsgStr

      public static String getDelimiterFromFixMsgStr(String _line)
      Extract delimiter of FixMessageString.
      Parameter:
      _line - line to read
      Gibt zurück:
      delimiter or null
    • getFixTagValueFromString

      public static String getFixTagValueFromString(String _msg, char _delimiter, int _tag)
      Get a value from a FixMessage String.
      Parameter:
      _msg - string fix message to parse
      _delimiter - delimiter to use
      _tag - tag to find
      Gibt zurück:
      value or null if tag could not be found
    • getFixTagValueFromString

      public static String getFixTagValueFromString(String _msg, int _tag)
      Get a value from a FixMessage String.
      Parameter:
      _msg - fix message as string
      _tag - tag to read
      Gibt zurück:
      value or null if tag could not be found
    • setFixTagOnMsgStr

      public static String setFixTagOnMsgStr(String _msg, int _tag, String _value)
      Tries to update a fix message by setting _tag to _value. If _tag is not found, it is appended. This method also ensures that the header and trailer tags are in correct order.
      Parameter:
      _msg - fix message as string
      _tag - tag to write
      _value - value for tag
      Gibt zurück:
      string with added/changed tag value
    • setFixTagOnMsgStr

      public static String setFixTagOnMsgStr(String _msg, int _tag, String _value, char _delim)
      Tries to update a fix message by setting _tag to _value. If _tag is not found, it is appended. This method also ensures that the header and trailer tags are in correct order.
      Parameter:
      _msg - fix message as string
      _tag - tag to write
      _value - value to set
      _delim - delimiter to use
      Gibt zurück:
      string with added/changed tag value
    • calculateFixBodyLength

      public static int calculateFixBodyLength(String _msg)
      Calculates the body length of the given message.
      Parameter:
      _msg - fix message as string
      Gibt zurück:
      checksum
    • calculateFixBodyLength

      public static int calculateFixBodyLength(String _msg, char _delimiter)
      Calculates the body length of the given message.
      Parameter:
      _msg - fix message as string
      _delimiter - delimiter to use
      Gibt zurück:
      body length
    • updateFixBodyLength

      public static String updateFixBodyLength(String _msg)
      Calculates the bodylength of a messages and writes it to tag 9.
      Parameter:
      _msg - fix message as string
      Gibt zurück:
      message with updated body length
    • calculateFixCheckSum

      public static String calculateFixCheckSum(String _msg, char _delim)
      Calculates the checksum of the message.
      Parameter:
      _msg - fix message as string
      _delim - delimiter to use
      Gibt zurück:
      checksum
    • updateFixCheckSum

      public static String updateFixCheckSum(String _msg)
      Sets the correct checksum in tag 10.
      Parameter:
      _msg - fix message as string
      Gibt zurück:
      fix message with updated checksum
    • looksLikeFixMsg

      public static boolean looksLikeFixMsg(String _msg)
      Checks if given String looks like a FIX message.
      Parameter:
      _msg - fix message as string
      Gibt zurück:
      true if format matches a FIX message, false otherwise