Class HighPrecisionDateTimeParsers

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

public class HighPrecisionDateTimeParsers extends Object
Helper class for FIX date and time formats.

Provides ability for parsing different types of date/time values from the buffer of bytes. It is also possible to work with high precision values: micro- and nanoseconds.

Author:
Liubov_Efremova
  • Field Details

    • LOCAL_ZONE_OFFSET

      protected static final ZoneOffset LOCAL_ZONE_OFFSET
  • Method Details

    • parseTimeOnly

      public static LocalTime parseTimeOnly(byte[] buffer)
      Parses the TimeOnly value from buffer . The format for TimeOnly is HH:MM:SS[.sss][sss][sss]
      Parameters:
      buffer - the buffer of bytes
      Returns:
      the local time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException
    • parseTimeOnly

      public static LocalTime parseTimeOnly(byte[] buffer, int offset, int count)
      Parses the TimeOnly value from buffer . The format for TimeOnly is HH:MM:SS[.sss][sss][sss]
      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
      Returns:
      the local time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException
    • parseLocalMktTime

      public static LocalTime parseLocalMktTime(byte[] buffer, int offset, int count)
      Parses the LocalMktTime value from buffer . The format for LocalMktTime is HH:MM:SS
      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      Returns:
      the local time structured from the given buffer

      Throws:
      IllegalArgumentException
    • parseTZTimeOnly

      public static OffsetTime parseTZTimeOnly(byte[] buffer)
      Parses the TZTimeOnly value from buffer . The format for TZTimeOnly is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]
      Parameters:
      buffer - the buffer of bytes
      Returns:
      the offset time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException
    • parseTZTimeOnly

      public static OffsetTime parseTZTimeOnly(byte[] buffer, int offset, int count)
      Parses the TZTimeOnly value from buffer . 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
      Returns:
      the offset time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException
    • parseTimestamp

      public static LocalDateTime parseTimestamp(byte[] buffer)
      Parses the Timestamp value from buffer to dateTime. The format for Timestamp is YYYYMMDD-HH:MM:SS[.sss][sss][sss].
      Parameters:
      buffer - the buffer of bytes
      Returns:
      the local date time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException
    • parseTimestamp

      public static LocalDateTime parseTimestamp(byte[] buffer, int offset, int count)
      Parses the Timestamp value from buffer to dateTime. The format for Timestamp is YYYYMMDD-HH:MM:SS[.sss][sss][sss].
      Parameters:
      buffer - the buffer of bytes
      offset - the initial offset
      count - the length
      Returns:
      the local date time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException
    • parseTZTimestamp

      public static OffsetDateTime parseTZTimestamp(byte[] buffer)
      Parses the TZTimestamp value from buffer . The format for TZTimestamp is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]
      Parameters:
      buffer - the buffer of bytes
      Returns:
      the offset time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException
    • parseTZTimestamp

      public static OffsetDateTime parseTZTimestamp(byte[] buffer, int offset, int count)
      Parses the TZTimestamp value from buffer . 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
      Returns:
      the offset time structured from the given buffer

      In contrast to Calendar supports nanoseconds precision.

      Throws:
      IllegalArgumentException