Package com.epam.fix.message
Class HighPrecisionDateTimeParsers
java.lang.Object
com.epam.fix.message.HighPrecisionDateTimeParsers
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalTime
parseLocalMktTime
(byte[] buffer, int offset, int count) Parses theLocalMktTime
value frombuffer
.static LocalTime
parseTimeOnly
(byte[] buffer) Parses theTimeOnly
value frombuffer
.static LocalTime
parseTimeOnly
(byte[] buffer, int offset, int count) Parses theTimeOnly
value frombuffer
.static LocalDateTime
parseTimestamp
(byte[] buffer) Parses theTimestamp
value frombuffer
todateTime
.static LocalDateTime
parseTimestamp
(byte[] buffer, int offset, int count) Parses theTimestamp
value frombuffer
todateTime
.static OffsetTime
parseTZTimeOnly
(byte[] buffer) Parses theTZTimeOnly
value frombuffer
.static OffsetTime
parseTZTimeOnly
(byte[] buffer, int offset, int count) Parses theTZTimeOnly
value frombuffer
.static OffsetDateTime
parseTZTimestamp
(byte[] buffer) Parses theTZTimestamp
value frombuffer
.static OffsetDateTime
parseTZTimestamp
(byte[] buffer, int offset, int count) Parses theTZTimestamp
value frombuffer
.
-
Field Details
-
LOCAL_ZONE_OFFSET
-
-
Method Details
-
parseTimeOnly
Parses theTimeOnly
value frombuffer
. The format forTimeOnly
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
Parses theTimeOnly
value frombuffer
. The format forTimeOnly
is HH:MM:SS[.sss][sss][sss]- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length- Returns:
- the local time structured from the given buffer
In contrast to
Calendar
supports nanoseconds precision. - Throws:
IllegalArgumentException
-
parseLocalMktTime
Parses theLocalMktTime
value frombuffer
. The format forLocalMktTime
is HH:MM:SS- Parameters:
buffer
- the buffer of bytesoffset
- the initial offset- Returns:
- the local time structured from the given buffer
- Throws:
IllegalArgumentException
-
parseTZTimeOnly
Parses theTZTimeOnly
value frombuffer
. The format forTZTimeOnly
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
Parses theTZTimeOnly
value frombuffer
. The format forTZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length- Returns:
- the offset time structured from the given buffer
In contrast to
Calendar
supports nanoseconds precision. - Throws:
IllegalArgumentException
-
parseTimestamp
Parses theTimestamp
value frombuffer
todateTime
. The format forTimestamp
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
Parses theTimestamp
value frombuffer
todateTime
. The format forTimestamp
is YYYYMMDD-HH:MM:SS[.sss][sss][sss].- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length- Returns:
- the local date time structured from the given buffer
In contrast to
Calendar
supports nanoseconds precision. - Throws:
IllegalArgumentException
-
parseTZTimestamp
Parses theTZTimestamp
value frombuffer
. The format forTZTimestamp
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
Parses theTZTimestamp
value frombuffer
. The format forTZTimestamp
is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length- Returns:
- the offset time structured from the given buffer
In contrast to
Calendar
supports nanoseconds precision. - Throws:
IllegalArgumentException
-