Class FIXTypes

java.lang.Object
com.epam.fix.message.FIXTypes

public final class FIXTypes extends Object
FIX Types helper class. Provides ability for parsing values from buffer of bytes.
  • Field Details

    • MAX_LONG_LAST_DIGIT

      public static final long MAX_LONG_LAST_DIGIT
      See Also:
    • MAX_LONG_DIV_10

      public static final long MAX_LONG_DIV_10
      See Also:
    • UTC_TIMEZONE

      public static final TimeZone UTC_TIMEZONE
    • LOCAL_TIMEZONE

      public static final TimeZone LOCAL_TIMEZONE
    • DEF_LOCALE

      public static final Locale DEF_LOCALE
    • MAX_PRECISION

      public static final int MAX_PRECISION
      See Also:
  • Method Details

    • parseFloat

      public static double parseFloat(byte[] value)
      Parses the float value from bytes.
      Parameters:
      value - the buffer of bytes
      Throws:
      IllegalArgumentException
    • parseFloat

      public static double parseFloat(byte[] buffer, int offset, int count)
      Garbage-free method for converting string to double
    • formatDouble

      @Deprecated public static byte[] formatDouble(double value)
      Deprecated.
      DoubleFormat.format
      Formats the float value.
      Parameters:
      value - the value
    • formatDouble

      @Deprecated public static void formatDouble(double value, int precision, byte[] buff, int offset)
      Deprecated.
    • formatDoubleLength

      @Deprecated public static int formatDoubleLength(double value, int precision)
      Deprecated.
    • isInvalidFloat

      public static boolean isInvalidFloat(byte[] buffer)
      Returns false, if buffer contains the invalid float value.
      Parameters:
      buffer - the buffer of bytes
    • isInvalidFloat

      public static boolean isInvalidFloat(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid float value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • parseBoolean

      public static boolean parseBoolean(byte[] buffer, int offset, int count)
      Parses the boolean value from subarray.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
      Throws:
      IllegalArgumentException
    • parseBoolean

      public static boolean parseBoolean(byte[] buffer)
      Parses the boolean value from bytes.
      Parameters:
      buffer - the buffer of bytes
      Throws:
      IllegalArgumentException
    • formatBoolean

      public static byte[] formatBoolean(boolean value)
      Formats the boolean value.
      Parameters:
      value - the value
    • isInvalidBoolean

      public static boolean isInvalidBoolean(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid boolean value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidBoolean

      public static boolean isInvalidBoolean(byte[] buffer)
      Returns true, if buffer contains the invalid boolean value.
      Parameters:
      buffer - the buffer of bytes
    • parseNumberPart

      protected static int parseNumberPart(byte[] block, int off, int limit)
    • isInvalidTimestamp

      public static boolean isInvalidTimestamp(byte[] buffer)
    • isInvalidTimestamp40

      public static boolean isInvalidTimestamp40(byte[] buf)
    • isInvalidTimestamp40

      public static boolean isInvalidTimestamp40(byte[] buf, int off, int len)
    • isInvalidTimestamp

      public static boolean isInvalidTimestamp(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid Timestamp value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidTZTimestamp

      public static boolean isInvalidTZTimestamp(byte[] buffer)
      Returns true, if subarray contains the invalid TZTimestamp value.
      Parameters:
      buffer - the buffer of bytes
    • isInvalidTZTimestamp

      public static boolean isInvalidTZTimestamp(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid TZTimestamp value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for TZTimestamp is YYYYMMDD-HH:MM[:SS[.sss][sss][sss]][Z | [ + | - hh[:mm]]].

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidTimeOnly

      public static boolean isInvalidTimeOnly(byte[] buffer)
      Returns true, if buffer contains the invalid TimeOnly value.

      The format for TimeOnly is HH:MM:SS[.sss][sss][sss]

      Parameters:
      buffer - the buffer of bytes
    • isInvalidTimeOnly

      public static boolean isInvalidTimeOnly(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid TimeOnly value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for TimeOnly is HH:MM:SS[.sss]

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidLocalMktTime

      public static boolean isInvalidLocalMktTime(byte[] buffer)
      Returns true, if buffer contains the invalid LocalMktTime value.

      The format for LocalMktTime is HH:MM:SS

      Parameters:
      buffer - the buffer of bytes
    • isInvalidLocalMktTime

      public static boolean isInvalidLocalMktTime(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid LocalMktTime value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for LocalMktTime is HH:MM:SS

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidTenor

      public static boolean isInvalidTenor(byte[] buffer)
      Returns true, if buffer contains the invalid Tenor value.

      The format for Tenor is Dx = tenor expression for “days”, e.g. “D5”, where “x” is any integer > 0 Mx = tenor expression for “months”, e.g. “M3”, where “x” is any integer > 0 Wx = tenor expression for “weeks”, e.g. “W13”, where “x” is any integer > 0 Yx = tenor expression for “years”, e.g. “Y1”, where “x” is any integer > 0

      Parameters:
      buffer - the buffer of bytes
    • isInvalidTenor

      public static boolean isInvalidTenor(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid Tenor value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for Tenor is Dx = tenor expression for “days”, e.g. “D5”, where “x” is any integer > 0 Mx = tenor expression for “months”, e.g. “M3”, where “x” is any integer > 0 Wx = tenor expression for “weeks”, e.g. “W13”, where “x” is any integer > 0 Yx = tenor expression for “years”, e.g. “Y1”, where “x” is any integer > 0

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidTZTimeOnly

      public static boolean isInvalidTZTimeOnly(byte[] buffer)
      Returns true, if subarray contains the invalid TZTimeOnly value.

      The format for TZTimeOnly is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].

      Parameters:
      buffer - the buffer of bytes
    • isInvalidTZTimeOnly

      public static boolean isInvalidTZTimeOnly(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid TZTimeOnly value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for TZTimeOnly is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]].

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidDate

      public static boolean isInvalidDate(byte[] buffer)
      Returns true, if subarray contains the invalid Date value.

      The format for Date is yyyymmdd.

      Parameters:
      buffer - the buffer of bytes
    • isInvalidDate

      public static boolean isInvalidDate(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid Date value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for Date is yyyymmdd.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidMonthYear

      public static boolean isInvalidMonthYear(byte[] buffer)
      Returns true, if subarray contains the invalid MonthYear value.

      The format for MonthYear is YYYYMM.

      Parameters:
      buffer - the buffer of bytes
    • isInvalidMonthYear

      public static boolean isInvalidMonthYear(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid MonthYear value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for MonthYear is YYYYMM.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • isInvalidMonthYear44

      public static boolean isInvalidMonthYear44(byte[] buffer)
      Returns true, if subarray contains the invalid MonthYear44 value.

      The format for MonthYear are YYYYMM,YYYYMMDD and YYYYMMWW.

      Parameters:
      buffer - the buffer of bytes
    • isInvalidMonthYear44

      public static boolean isInvalidMonthYear44(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid MonthYear44 value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for MonthYear are YYYYMM,YYYYMMDD and YYYYMMWW.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • parseMonthYear44

      public static Calendar parseMonthYear44(byte[] buffer, Calendar calendar)
      Parses the MonthYear44 value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for MonthYear44 are YYYYMM, YYYYMMDD and YYYYMMWW.

      Throws:
      IllegalArgumentException
    • parseMonthYear44

      public static Calendar parseMonthYear44(byte[] buffer, int offset, int length, Calendar calendar)
      Parses the MonthYear44 value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for MonthYear44 are YYYYMM, YYYYMMDD and YYYYMMWW.

      Throws:
      IllegalArgumentException
    • parseMonthYear44

      public static Calendar parseMonthYear44(byte[] buffer)
      Parses the MonthYear44 value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for MonthYear44 are YYYYMM, YYYYMMDD and YYYYMMWW.

      Throws:
      IllegalArgumentException
    • formatMonthYear44

      public static byte[] formatMonthYear44(Calendar calendar)
      Formats the MonthYear44 value from calendar .
      Parameters:
      calendar - the calendar

      The format for MonthYear44 are YYYYMM, YYYYMMDD and YYYYMMWW.

      Throws:
      IllegalArgumentException
    • isInvalidTime

      public static boolean isInvalidTime(byte[] buffer)
      Returns true, if subarray contains the invalid Time value.

      The format for Time is YYYYMMDD-HH:MM:SS.

      Parameters:
      buffer - the buffer of bytes
    • isInvalidTime

      public static boolean isInvalidTime(byte[] buffer, int offset, int count)
      Returns true, if subarray contains the invalid Time value.

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      The format for Time is YYYYMMDD-HH:MM:SS.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
    • parseTimestamp40

      public static Calendar parseTimestamp40(byte[] buffer, Calendar calendar)
      Parses the Timestamp40 value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for Timestamp40 is YYYYMMDD-HH:MM:SS

      Throws:
      IllegalArgumentException
    • parseTimestamp

      public static Calendar parseTimestamp(byte[] buffer, Calendar calendar)
      Parses the Timestamp value from buffer to calendar.
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for Timestamp is YYYYMMDD-HH:MM:SS[.sss]

      Throws:
      IllegalArgumentException
    • parseTimestamp

      public static Calendar parseTimestamp(byte[] buffer, int offset, int length, Calendar calendar)
      Parses the Timestamp value from buffer to calendar.
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for Timestamp is YYYYMMDD-HH:MM:SS[.sss]

      Throws:
      IllegalArgumentException
    • parseUTCTimestamp

      public static Calendar parseUTCTimestamp(byte[] buffer)
      Parses the UTCTimestamp value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for UTCTimestamp is YYYYMMDD-HH:MM:SS[.sss]

      Throws:
      IllegalArgumentException
    • parseUTCTimestamp40

      public static Calendar parseUTCTimestamp40(byte[] buffer)
      Parses the UTCTimestamp40 value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for UTCTimestamp40 is YYYYMMDD-HH:MM:SS

      Throws:
      IllegalArgumentException
    • parseTimeOnly

      public static Calendar parseTimeOnly(byte[] buffer, Calendar calendar)
      Parses the TimeOnly value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for TimeOnly is HH:MM:SS[.sss]

      Throws:
      IllegalArgumentException
    • parseTimeOnly

      public static Calendar parseTimeOnly(byte[] buffer, int offset, int length, Calendar calendar)
      Parses the TimeOnly value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for TimeOnly is HH:MM:SS[.sss]

      Throws:
      IllegalArgumentException
    • parseLocalMktTime

      public static Calendar parseLocalMktTime(byte[] buffer, int offset, int length, Calendar calendar)
      Parses the LocalMktTime value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for LocalMktTime is HH:MM:SS

      Throws:
      IllegalArgumentException
    • parseTZTimeOnly

      public static Calendar parseTZTimeOnly(byte[] buffer)
      Parses the TZTimeOnly value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for TZTimeOnly is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]

      Throws:
      IllegalArgumentException
    • parseTZTimeOnly

      public static Calendar parseTZTimeOnly(byte[] buffer, int offset, int length, Calendar calendar)
    • parseTZTimestamp

      public static Calendar parseTZTimestamp(byte[] buffer)
      Parses the TZTimestamp value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for TZTimeOnly is YYYYMMDD-HH:MM[:SS][Z | [ + | - hh[:mm]]].

      Throws:
      IllegalArgumentException
    • parseTZTimestamp

      public static void parseTZTimestamp(byte[] buffer, int offset, int length, Calendar calendar)
      Parses the TZTimestamp value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for TZTimestamp is YYYYMMDD-HH:MM[:SS][Z | [ + | - hh[:mm]]].

      Throws:
      IllegalArgumentException
    • parseUTCTimeOnly

      public static Calendar parseUTCTimeOnly(byte[] buffer)
      Parses the UTCTimeOnly value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for UTCTimeOnly is HH:MM:SS[.sss].

      Throws:
      IllegalArgumentException
    • parseUTCTimeOnly

      public static Calendar parseUTCTimeOnly(byte[] buffer, int offset, int length, Calendar cal)
      Parses the UTCTimeOnly value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for UTCTimeOnly is HH:MM:SS[.sss].

      Throws:
      IllegalArgumentException
    • parseDate

      public static Calendar parseDate(byte[] buffer, Calendar calendar)
      Parses the Date value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for Date is YYYYMMDD.

      Throws:
      IllegalArgumentException
    • parseDate

      public static Calendar parseDate(byte[] buffer, int offset, int length, Calendar calendar)
      Parses the Date value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for Date is YYYYMMDD.

      Throws:
      IllegalArgumentException
    • parseDate

      public static Calendar parseDate(byte[] buffer)
      Parses the Date value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for Date is YYYYMMDD.

      Throws:
      IllegalArgumentException
    • parseDatePart

      protected static int parseDatePart(byte[] buffer, int year, int month)
    • parseDatePart

      protected static int parseDatePart(byte[] buffer, int offset, int year, int month)
    • parseMonthPart

      protected static int parseMonthPart(byte[] block)
    • parseMonthPart

      protected static int parseMonthPart(byte[] block, int offset)
    • parseYearPart

      protected static int parseYearPart(byte[] block)
    • parseYearPart

      protected static int parseYearPart(byte[] block, int offset)
    • parseUTCDate

      public static Calendar parseUTCDate(byte[] buffer)
      Parses the UTCDate value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for UTCDate is YYYYMMDD.

      Throws:
      IllegalArgumentException
    • parseLocalMktDate

      public static Calendar parseLocalMktDate(byte[] buffer)
      Parses the LocalMktDate value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for LocalMktDate is YYYYMMDD.

      Throws:
      IllegalArgumentException
    • parseMonthYear

      public static Calendar parseMonthYear(byte[] buffer, Calendar calendar)
      Parses the MonthYear value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for MonthYear is YYYYMM.

      Throws:
      IllegalArgumentException
    • parseMonthYear

      public static Calendar parseMonthYear(byte[] buffer, int offset, int length, Calendar calendar)
      Parses the MonthYear value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for MonthYear is YYYYMM.

      Throws:
      IllegalArgumentException
    • parseMonthYear

      public static Calendar parseMonthYear(byte[] buffer)
      Parses the MonthYear value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for MonthYear is YYYYMM.

      Throws:
      IllegalArgumentException
    • parseTime

      public static Calendar parseTime(byte[] buffer, Calendar calendar)
      Parses the Time value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for Time is YYYYMMDD-HH:MM:SS.

      Throws:
      IllegalArgumentException
    • parseShortTime

      public static Calendar parseShortTime(byte[] buffer, Calendar calendar)
      Parses the Time value from buffer .
      Parameters:
      buffer - the buffer of bytes
      calendar - the calendar

      The format for Time is HH:MM:SS.

      Throws:
      IllegalArgumentException
    • parseTime

      public static Calendar parseTime(byte[] buffer)
      Parses the Time value from buffer .
      Parameters:
      buffer - the buffer of bytes

      The format for Time is YYYYMMDD-HH:MM:SS.

      Returns:
      the calendar
      Throws:
      IllegalArgumentException
    • parseTenor

      public static Period parseTenor(byte[] buffer, int offset, int count)
      Parses the Tenor value from buffer . The format for Tenor is ('Dx','Mx','Wx','Yx' where 'x' is any int)
      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      Returns:
      the local time structured from the given buffer

      Throws:
      IllegalArgumentException
    • formatUTCTimestamp40

      public static byte[] formatUTCTimestamp40(Calendar calendar)
      Formats the value of calendar to the UTCTimestamp40 format.

      The format for UTCTimestamp40 is YYYYMMDD-HH:MM:SS.

      Parameters:
      calendar - the value
    • formatUTCTimestamp

      public static byte[] formatUTCTimestamp(Calendar calendar)
      Formats the value of calendar to the UTCTimestamp format.

      The format for UTCTimestamp is YYYYMMDD-HH:MM:SS[.sss].

      Parameters:
      calendar - the value
    • formatUTCTimestampWithMs

      public static void formatUTCTimestampWithMs(Calendar calendar, byte[] sendingTimeBufMs)
      Format UTC timestamp with include milliseconds
      Parameters:
      calendar - timestamp
      sendingTimeBufMs - buffer size must be 21
    • formatUTCTimestampWithoutMs

      public static void formatUTCTimestampWithoutMs(Calendar calendar, byte[] sendingTimeBufNoMs)
      Format UTC timestamp with include milliseconds
      Parameters:
      calendar - timestamp
      sendingTimeBufNoMs - buffer size must be 17
    • formatUTCTimeOnly

      public static byte[] formatUTCTimeOnly(Calendar calendar)
      Formats the value of calendar to the UTCTimeOnly format.

      The format for UTCTimeOnly is HH:MM:SS[.sss].

      Parameters:
      calendar - the value
    • formatTZTimeOnly

      public static byte[] formatTZTimeOnly(Calendar calendar)
      Formats the value of calendar to the TZTimeOnly format.

      The format for TZTimeOnly is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].

      Parameters:
      calendar - the value
    • formatTZTimestamp

      public static byte[] formatTZTimestamp(Calendar calendar)
      Formats the value of calendar to the TZTimestamp format.

      The format for TZTimestamp is YYYYMMDD-HH:MM[:SS[.sss]][Z | [ + | - hh[:mm]]].

      Parameters:
      calendar - the calendar
    • formatDate

      public static byte[] formatDate(Calendar calendar)
      Formats the value of calendar to the Date format.

      The format for Date is YYYYMMDD.

      Parameters:
      calendar - the calendar
    • formatUTCDate

      public static byte[] formatUTCDate(Calendar calendar)
      Formats the value of calendar to the UTCDate format.

      The format for UTCDate is YYYYMMDD.

      Parameters:
      calendar - the calendar
    • formatLocalMktDate

      public static byte[] formatLocalMktDate(Calendar calendar)
      Formats the value of calendar to the LocalMktDate format.

      The format for LocalMktDate is YYYYMMDD.

      Parameters:
      calendar - the calendar
    • formatMonthYear

      public static byte[] formatMonthYear(Calendar calendar)
      Formats the value of calendar to the MonthYear format.

      The format for MonthYear is YYYYMM.

      Parameters:
      calendar - the calendar
    • formatTime

      public static byte[] formatTime(Calendar calendar)
      Formats the value of calendar to the Time format.

      The format for Time is YYYYMMDD-HH:MM:SS.

      Parameters:
      calendar - the calendar
    • parseInt

      public static long parseInt(byte[] buffer)
      Parses the integer value from buffer .
      Parameters:
      buffer - the buffer of bytes
      Throws:
      IllegalArgumentException
    • parseInt

      public static long parseInt(byte[] buffer, int offset, int count)
      Parses the integer value from buffer .

      The offset argument is the index of the first byte of the subarray and the count argument specifies the length of the subarray.

      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
      Throws:
      IllegalArgumentException
    • parseInt

      public static long parseInt(String str, int offset, int count)
      Parses the integer value from str .

      The offset argument is the index of the first char of the substring and the count argument specifies the length of the substring.

      Parameters:
      str - a string representation of an integer.
      offset - the initial offset
      count - the length
      Throws:
      IllegalArgumentException
    • formatInt

      public static byte[] formatInt(long value)
      Formats the integer value.
      Parameters:
      value - the value
      Returns:
      the buffer
    • formatIntLength

      public static int formatIntLength(long value)
    • formatInt

      public static int formatInt(long value, byte[] buffer)
    • formatInt

      public static int formatInt(long value, byte[] buffer, int offset)
    • formatIntLengthWithPadding

      public static int formatIntLengthWithPadding(long value, int padLength)
    • formatIntWithPadding

      public static int formatIntWithPadding(long value, int padLength, byte[] buffer, int offset)
    • formatDoubleWithPadding

      public static void formatDoubleWithPadding(double value, int precision, int padLength, byte[] buffer, int offset)
    • formatUInt

      public static byte[] formatUInt(long value)
      Formats the integer value.
      Parameters:
      value - the value
      Returns:
      the buffer
    • isInvalidInt

      public static boolean isInvalidInt(byte[] buffer)
      Returns true, if subarray contains the invalid integer value.
      Parameters:
      buffer - the buffer of bytes
    • isInvalidInt

      public static boolean isInvalidInt(byte[] buf, int off, int len)
      Check if buffer has invalid integer number
      Parameters:
      buf - - buffer
      off - - buffer offset
      len - - buffer length
      Returns:
      true if invalid
    • formatCheckSum

      public static byte[] formatCheckSum(int checkSum)
      Formats the check sum.
      Parameters:
      checkSum - the check sum
      Returns:
      formated string
    • formatStorageTimestamp

      @Deprecated public static byte[] formatStorageTimestamp(Calendar calendar, byte[] buffer, int offset)
      Deprecated.
      Format timestamp with milliseconds precision
      Parameters:
      calendar -
      buffer -
      offset -
      Returns:
    • formatTimestamp

      public static byte[] formatTimestamp(byte[] buffer, int offset, Calendar calendar, long additionalFractions, TimestampPrecision precision)
    • formatStorageTimestamp

      public static byte[] formatStorageTimestamp(byte[] buffer, int offset, Calendar calendar, long additionalFractions, TimestampPrecision precision)
    • formatBackupStorageTimestamp

      @Deprecated public static byte[] formatBackupStorageTimestamp(Calendar calendar)
      Deprecated.
      Format backup storage timestamp with default millisecond precision
      Parameters:
      calendar -
      Returns:
    • formatBackupStorageTimestamp

      public static byte[] formatBackupStorageTimestamp(byte[] buffer, Calendar calendar, long additionalFractions, TimestampPrecision precision)