public class HighPrecisionDateTimeParsers extends Object
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.
Modifier and Type | Field and Description |
---|---|
protected static ZoneOffset |
LOCAL_ZONE_OFFSET |
Constructor and Description |
---|
HighPrecisionDateTimeParsers() |
Modifier and Type | Method and Description |
---|---|
static LocalTime |
parseLocalMktTime(byte[] buffer,
int offset,
int count)
Parses the
LocalMktTime value from buffer . |
static LocalTime |
parseTimeOnly(byte[] buffer)
Parses the
TimeOnly value from buffer . |
static LocalTime |
parseTimeOnly(byte[] buffer,
int offset,
int count)
Parses the
TimeOnly value from buffer . |
static LocalDateTime |
parseTimestamp(byte[] buffer)
Parses the
Timestamp value from buffer to dateTime . |
static LocalDateTime |
parseTimestamp(byte[] buffer,
int offset,
int count)
Parses the
Timestamp value from buffer to dateTime . |
static OffsetTime |
parseTZTimeOnly(byte[] buffer)
Parses the
TZTimeOnly value from buffer . |
static OffsetTime |
parseTZTimeOnly(byte[] buffer,
int offset,
int count)
Parses the
TZTimeOnly value from buffer . |
static OffsetDateTime |
parseTZTimestamp(byte[] buffer)
Parses the
TZTimestamp value from buffer . |
static OffsetDateTime |
parseTZTimestamp(byte[] buffer,
int offset,
int count)
Parses the
TZTimestamp value from buffer . |
protected static final ZoneOffset LOCAL_ZONE_OFFSET
public static LocalTime parseTimeOnly(byte[] buffer)
TimeOnly
value from buffer
.
The format for TimeOnly
is HH:MM:SS[.sss][sss][sss]buffer
- the buffer of bytesCalendar
supports nanoseconds precision.IllegalArgumentException
public static LocalTime parseTimeOnly(byte[] buffer, int offset, int count)
TimeOnly
value from buffer
.
The format for TimeOnly
is HH:MM:SS[.sss][sss][sss]buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthCalendar
supports nanoseconds precision.IllegalArgumentException
public static LocalTime parseLocalMktTime(byte[] buffer, int offset, int count)
LocalMktTime
value from buffer
.
The format for LocalMktTime
is HH:MM:SSbuffer
- the buffer of bytesoffset
- the initial offsetIllegalArgumentException
public static OffsetTime parseTZTimeOnly(byte[] buffer)
TZTimeOnly
value from buffer
.
The format for TZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]buffer
- the buffer of bytesCalendar
supports nanoseconds precision.IllegalArgumentException
public static OffsetTime parseTZTimeOnly(byte[] buffer, int offset, int count)
TZTimeOnly
value from buffer
.
The format for TZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthCalendar
supports nanoseconds precision.IllegalArgumentException
public static LocalDateTime parseTimestamp(byte[] buffer)
Timestamp
value from buffer
to dateTime
.
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss][sss][sss].buffer
- the buffer of bytesCalendar
supports nanoseconds precision.IllegalArgumentException
public static LocalDateTime parseTimestamp(byte[] buffer, int offset, int count)
Timestamp
value from buffer
to dateTime
.
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss][sss][sss].buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthCalendar
supports nanoseconds precision.IllegalArgumentException
public static OffsetDateTime parseTZTimestamp(byte[] buffer)
TZTimestamp
value from buffer
.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]buffer
- the buffer of bytesCalendar
supports nanoseconds precision.IllegalArgumentException
public static OffsetDateTime parseTZTimestamp(byte[] buffer, int offset, int count)
TZTimestamp
value from buffer
.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]]buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthCalendar
supports nanoseconds precision.IllegalArgumentException
Copyright © 2000–2022 EPAM Systems. All rights reserved.