public final class FIXTypes extends Object
Modifier and Type | Field and Description |
---|---|
static Locale |
DEF_LOCALE |
static TimeZone |
LOCAL_TIMEZONE |
static long |
MAX_LONG_DIV_10 |
static long |
MAX_LONG_LAST_DIGIT |
static int |
MAX_PRECISION |
static TimeZone |
UTC_TIMEZONE |
Modifier and Type | Method and Description |
---|---|
static byte[] |
formatBackupStorageTimestamp(byte[] buffer,
Calendar calendar,
long additionalFractions,
TimestampPrecision precision) |
static byte[] |
formatBackupStorageTimestamp(Calendar calendar)
Deprecated.
|
static byte[] |
formatBoolean(boolean value)
Formats the boolean
value . |
static byte[] |
formatCheckSum(int checkSum)
Formats the check sum.
|
static byte[] |
formatDate(Calendar calendar)
Formats the value of
calendar to the Date format. |
static byte[] |
formatDouble(double value)
Deprecated.
DoubleFormat.format
|
static void |
formatDouble(double value,
int precision,
byte[] buff,
int offset)
Deprecated.
|
static int |
formatDoubleLength(double value,
int precision)
Deprecated.
|
static void |
formatDoubleWithPadding(double value,
int precision,
int padLength,
byte[] buffer,
int offset) |
static byte[] |
formatInt(long value)
Formats the integer value.
|
static int |
formatInt(long value,
byte[] buffer) |
static int |
formatInt(long value,
byte[] buffer,
int offset) |
static int |
formatIntLength(long value) |
static int |
formatIntLengthWithPadding(long value,
int padLength) |
static int |
formatIntWithPadding(long value,
int padLength,
byte[] buffer,
int offset) |
static byte[] |
formatLocalMktDate(Calendar calendar)
Formats the value of
calendar to the LocalMktDate format. |
static byte[] |
formatMonthYear(Calendar calendar)
Formats the value of
calendar to the MonthYear format. |
static byte[] |
formatMonthYear44(Calendar calendar)
Formats the
MonthYear44 value from calendar . |
static byte[] |
formatStorageTimestamp(byte[] buffer,
int offset,
Calendar calendar,
long additionalFractions,
TimestampPrecision precision) |
static byte[] |
formatStorageTimestamp(Calendar calendar,
byte[] buffer,
int offset)
Deprecated.
|
static byte[] |
formatTime(Calendar calendar)
Formats the value of
calendar to the Time format. |
static byte[] |
formatTimestamp(byte[] buffer,
int offset,
Calendar calendar,
long additionalFractions,
TimestampPrecision precision) |
static byte[] |
formatTZTimeOnly(Calendar calendar)
Formats the value of
calendar to the TZTimeOnly format. |
static byte[] |
formatTZTimestamp(Calendar calendar)
Formats the value of
calendar to the TZTimestamp format. |
static byte[] |
formatUInt(long value)
Formats the integer value.
|
static byte[] |
formatUTCDate(Calendar calendar)
Formats the value of
calendar to the UTCDate format. |
static byte[] |
formatUTCTimeOnly(Calendar calendar)
Formats the value of
calendar to the UTCTimeOnly format. |
static byte[] |
formatUTCTimestamp(Calendar calendar)
Formats the value of
calendar to the UTCTimestamp format. |
static byte[] |
formatUTCTimestamp40(Calendar calendar)
Formats the value of
calendar to the UTCTimestamp40 format. |
static void |
formatUTCTimestampWithMs(Calendar calendar,
byte[] sendingTimeBufMs)
Format UTC timestamp with include milliseconds
|
static void |
formatUTCTimestampWithoutMs(Calendar calendar,
byte[] sendingTimeBufNoMs)
Format UTC timestamp with include milliseconds
|
static boolean |
isInvalidBoolean(byte[] buffer)
Returns true, if
buffer contains the invalid boolean value. |
static boolean |
isInvalidBoolean(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
boolean value. |
static boolean |
isInvalidDate(byte[] buffer)
Returns true, if subarray contains the invalid
Date value. |
static boolean |
isInvalidDate(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
Date value. |
static boolean |
isInvalidFloat(byte[] buffer)
Returns false, if
buffer contains the invalid float value. |
static boolean |
isInvalidFloat(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid float value.
|
static boolean |
isInvalidInt(byte[] buffer)
Returns true, if subarray contains the invalid
integer value. |
static boolean |
isInvalidInt(byte[] buf,
int off,
int len)
Check if buffer has invalid integer number
|
static boolean |
isInvalidLocalMktTime(byte[] buffer)
Returns true, if
buffer contains the invalid LocalMktTime value. |
static boolean |
isInvalidLocalMktTime(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
LocalMktTime value. |
static boolean |
isInvalidMonthYear(byte[] buffer)
Returns true, if subarray contains the invalid
MonthYear value. |
static boolean |
isInvalidMonthYear(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
MonthYear value. |
static boolean |
isInvalidMonthYear44(byte[] buffer)
Returns true, if subarray contains the invalid
MonthYear44 value. |
static boolean |
isInvalidMonthYear44(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
MonthYear44 value. |
static boolean |
isInvalidTenor(byte[] buffer)
Returns true, if
buffer contains the invalid Tenor value. |
static boolean |
isInvalidTenor(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
Tenor value. |
static boolean |
isInvalidTime(byte[] buffer)
Returns true, if subarray contains the invalid
Time value. |
static boolean |
isInvalidTime(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
Time value. |
static boolean |
isInvalidTimeOnly(byte[] buffer)
Returns true, if
buffer contains the invalid TimeOnly value. |
static boolean |
isInvalidTimeOnly(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
TimeOnly value. |
static boolean |
isInvalidTimestamp(byte[] buffer) |
static boolean |
isInvalidTimestamp(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
Timestamp value. |
static boolean |
isInvalidTimestamp40(byte[] buf) |
static boolean |
isInvalidTimestamp40(byte[] buf,
int off,
int len) |
static boolean |
isInvalidTZTimeOnly(byte[] buffer)
Returns true, if subarray contains the invalid
TZTimeOnly value. |
static boolean |
isInvalidTZTimeOnly(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
TZTimeOnly value. |
static boolean |
isInvalidTZTimestamp(byte[] buffer)
Returns true, if subarray contains the invalid
TZTimestamp value. |
static boolean |
isInvalidTZTimestamp(byte[] buffer,
int offset,
int count)
Returns true, if subarray contains the invalid
TZTimestamp value. |
static boolean |
parseBoolean(byte[] buffer)
Parses the
boolean value from bytes. |
static boolean |
parseBoolean(byte[] buffer,
int offset,
int count)
Parses the
boolean value from subarray. |
static Calendar |
parseDate(byte[] buffer)
Parses the
Date value from buffer . |
static Calendar |
parseDate(byte[] buffer,
Calendar calendar)
Parses the
Date value from buffer . |
static Calendar |
parseDate(byte[] buffer,
int offset,
int length,
Calendar calendar)
Parses the
Date value from buffer . |
protected static int |
parseDatePart(byte[] buffer,
int year,
int month) |
protected static int |
parseDatePart(byte[] buffer,
int offset,
int year,
int month) |
static double |
parseFloat(byte[] value)
Parses the float value from bytes.
|
static double |
parseFloat(byte[] buffer,
int offset,
int count)
Garbage-free method for converting string to double
|
static long |
parseInt(byte[] buffer)
Parses the
integer value from buffer . |
static long |
parseInt(byte[] buffer,
int offset,
int count)
Parses the
integer value from buffer . |
static long |
parseInt(String str,
int offset,
int count)
Parses the
integer value from str . |
static Calendar |
parseLocalMktDate(byte[] buffer)
Parses the
LocalMktDate value from buffer . |
static Calendar |
parseLocalMktTime(byte[] buffer,
int offset,
int length,
Calendar calendar)
Parses the
LocalMktTime value from buffer . |
protected static int |
parseMonthPart(byte[] block) |
protected static int |
parseMonthPart(byte[] block,
int offset) |
static Calendar |
parseMonthYear(byte[] buffer)
Parses the
MonthYear value from buffer . |
static Calendar |
parseMonthYear(byte[] buffer,
Calendar calendar)
Parses the
MonthYear value from buffer . |
static Calendar |
parseMonthYear(byte[] buffer,
int offset,
int length,
Calendar calendar)
Parses the
MonthYear value from buffer . |
static Calendar |
parseMonthYear44(byte[] buffer)
Parses the
MonthYear44 value from buffer . |
static Calendar |
parseMonthYear44(byte[] buffer,
Calendar calendar)
Parses the
MonthYear44 value from buffer . |
static Calendar |
parseMonthYear44(byte[] buffer,
int offset,
int length,
Calendar calendar)
Parses the
MonthYear44 value from buffer . |
protected static int |
parseNumberPart(byte[] block,
int off,
int limit) |
static Calendar |
parseShortTime(byte[] buffer,
Calendar calendar)
Parses the
Time value from buffer . |
static Period |
parseTenor(byte[] buffer,
int offset,
int count)
Parses the
Tenor value from buffer . |
static Calendar |
parseTime(byte[] buffer)
Parses the
Time value from buffer . |
static Calendar |
parseTime(byte[] buffer,
Calendar calendar)
Parses the
Time value from buffer . |
static Calendar |
parseTimeOnly(byte[] buffer,
Calendar calendar)
Parses the
TimeOnly value from buffer . |
static Calendar |
parseTimeOnly(byte[] buffer,
int offset,
int length,
Calendar calendar)
Parses the
TimeOnly value from buffer . |
static Calendar |
parseTimestamp(byte[] buffer,
Calendar calendar)
Parses the
Timestamp value from buffer to calendar . |
static Calendar |
parseTimestamp(byte[] buffer,
int offset,
int length,
Calendar calendar)
Parses the
Timestamp value from buffer to calendar . |
static Calendar |
parseTimestamp40(byte[] buffer,
Calendar calendar)
Parses the
Timestamp40 value from buffer . |
static Calendar |
parseTZTimeOnly(byte[] buffer)
Parses the
TZTimeOnly value from buffer . |
static Calendar |
parseTZTimeOnly(byte[] buffer,
int offset,
int length,
Calendar calendar) |
static Calendar |
parseTZTimestamp(byte[] buffer)
Parses the
TZTimestamp value from buffer . |
static void |
parseTZTimestamp(byte[] buffer,
int offset,
int length,
Calendar calendar)
Parses the
TZTimestamp value from buffer . |
static Calendar |
parseUTCDate(byte[] buffer)
Parses the
UTCDate value from buffer . |
static Calendar |
parseUTCTimeOnly(byte[] buffer)
Parses the
UTCTimeOnly value from buffer . |
static Calendar |
parseUTCTimeOnly(byte[] buffer,
int offset,
int length,
Calendar cal)
Parses the
UTCTimeOnly value from buffer . |
static Calendar |
parseUTCTimestamp(byte[] buffer)
Parses the
UTCTimestamp value from buffer . |
static Calendar |
parseUTCTimestamp40(byte[] buffer)
Parses the
UTCTimestamp40 value from buffer . |
protected static int |
parseYearPart(byte[] block) |
protected static int |
parseYearPart(byte[] block,
int offset) |
public static final long MAX_LONG_LAST_DIGIT
public static final long MAX_LONG_DIV_10
public static final TimeZone UTC_TIMEZONE
public static final TimeZone LOCAL_TIMEZONE
public static final Locale DEF_LOCALE
public static final int MAX_PRECISION
public static double parseFloat(byte[] value)
value
- the buffer of bytesIllegalArgumentException
public static double parseFloat(byte[] buffer, int offset, int count)
@Deprecated public static byte[] formatDouble(double value)
float
value.value
- the value@Deprecated public static void formatDouble(double value, int precision, byte[] buff, int offset)
@Deprecated public static int formatDoubleLength(double value, int precision)
public static boolean isInvalidFloat(byte[] buffer)
buffer
contains the invalid float value.buffer
- the buffer of bytespublic static boolean isInvalidFloat(byte[] buffer, int offset, int count)
offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean parseBoolean(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthIllegalArgumentException
public static boolean parseBoolean(byte[] buffer)
boolean
value from bytes.buffer
- the buffer of bytesIllegalArgumentException
public static byte[] formatBoolean(boolean value)
value
.value
- the valuepublic static boolean isInvalidBoolean(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidBoolean(byte[] buffer)
buffer
contains the invalid boolean
value.buffer
- the buffer of bytesprotected static int parseNumberPart(byte[] block, int off, int limit)
public static boolean isInvalidTimestamp(byte[] buffer)
public static boolean isInvalidTimestamp40(byte[] buf)
public static boolean isInvalidTimestamp40(byte[] buf, int off, int len)
public static boolean isInvalidTimestamp(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidTZTimestamp(byte[] buffer)
TZTimestamp
value.buffer
- the buffer of bytespublic static boolean isInvalidTZTimestamp(byte[] buffer, int offset, int count)
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]]].buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidTimeOnly(byte[] buffer)
buffer
contains the invalid TimeOnly
value.
The format for TimeOnly
is HH:MM:SS[.sss][sss][sss]buffer
- the buffer of bytespublic static boolean isInvalidTimeOnly(byte[] buffer, int offset, int count)
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]buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidLocalMktTime(byte[] buffer)
buffer
contains the invalid LocalMktTime
value.
The format for LocalMktTime
is HH:MM:SSbuffer
- the buffer of bytespublic static boolean isInvalidLocalMktTime(byte[] buffer, int offset, int count)
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:SSbuffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidTenor(byte[] buffer)
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 > 0buffer
- the buffer of bytespublic static boolean isInvalidTenor(byte[] buffer, int offset, int count)
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 > 0buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidTZTimeOnly(byte[] buffer)
TZTimeOnly
value.
The format for TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].buffer
- the buffer of bytespublic static boolean isInvalidTZTimeOnly(byte[] buffer, int offset, int count)
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]]].buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidDate(byte[] buffer)
Date
value.
The format for Date
is yyyymmdd.buffer
- the buffer of bytespublic static boolean isInvalidDate(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidMonthYear(byte[] buffer)
MonthYear
value.
The format for MonthYear
is YYYYMM.buffer
- the buffer of bytespublic static boolean isInvalidMonthYear(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static boolean isInvalidMonthYear44(byte[] buffer)
MonthYear44
value.
The format for MonthYear
are YYYYMM,YYYYMMDD and YYYYMMWW.buffer
- the buffer of bytespublic static boolean isInvalidMonthYear44(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static Calendar parseMonthYear44(byte[] buffer, Calendar calendar)
MonthYear44
value from buffer
.buffer
- the buffer of bytes
The format for MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.IllegalArgumentException
public static Calendar parseMonthYear44(byte[] buffer, int offset, int length, Calendar calendar)
MonthYear44
value from buffer
.buffer
- the buffer of bytes
The format for MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.IllegalArgumentException
public static Calendar parseMonthYear44(byte[] buffer)
MonthYear44
value from buffer
.buffer
- the buffer of bytes
The format for MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.IllegalArgumentException
public static byte[] formatMonthYear44(Calendar calendar)
MonthYear44
value from calendar
.calendar
- the calendar
The format for MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.IllegalArgumentException
public static boolean isInvalidTime(byte[] buffer)
Time
value.
The format for Time
is YYYYMMDD-HH:MM:SS.buffer
- the buffer of bytespublic static boolean isInvalidTime(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthpublic static Calendar parseTimestamp40(byte[] buffer, Calendar calendar)
Timestamp40
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for Timestamp40
is YYYYMMDD-HH:MM:SSIllegalArgumentException
public static Calendar parseTimestamp(byte[] buffer, Calendar calendar)
Timestamp
value from buffer
to calendar
.buffer
- the buffer of bytescalendar
- the calendar
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss]IllegalArgumentException
public static Calendar parseTimestamp(byte[] buffer, int offset, int length, Calendar calendar)
Timestamp
value from buffer
to calendar
.buffer
- the buffer of bytescalendar
- the calendar
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss]IllegalArgumentException
public static Calendar parseUTCTimestamp(byte[] buffer)
UTCTimestamp
value from buffer
.buffer
- the buffer of bytes
The format for UTCTimestamp
is YYYYMMDD-HH:MM:SS[.sss]IllegalArgumentException
public static Calendar parseUTCTimestamp40(byte[] buffer)
UTCTimestamp40
value from buffer
.buffer
- the buffer of bytes
The format for UTCTimestamp40
is YYYYMMDD-HH:MM:SSIllegalArgumentException
public static Calendar parseTimeOnly(byte[] buffer, Calendar calendar)
TimeOnly
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for TimeOnly
is HH:MM:SS[.sss]IllegalArgumentException
public static Calendar parseTimeOnly(byte[] buffer, int offset, int length, Calendar calendar)
TimeOnly
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for TimeOnly
is HH:MM:SS[.sss]IllegalArgumentException
public static Calendar parseLocalMktTime(byte[] buffer, int offset, int length, Calendar calendar)
LocalMktTime
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for LocalMktTime
is HH:MM:SSIllegalArgumentException
public static Calendar parseTZTimeOnly(byte[] buffer)
TZTimeOnly
value from buffer
.buffer
- the buffer of bytes
The format for TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]IllegalArgumentException
public static Calendar parseTZTimeOnly(byte[] buffer, int offset, int length, Calendar calendar)
public static Calendar parseTZTimestamp(byte[] buffer)
TZTimestamp
value from buffer
.buffer
- the buffer of bytes
The format for TZTimeOnly
is YYYYMMDD-HH:MM[:SS][Z | [ + | - hh[:mm]]].IllegalArgumentException
public static void parseTZTimestamp(byte[] buffer, int offset, int length, Calendar calendar)
TZTimestamp
value from buffer
.buffer
- the buffer of bytes
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS][Z | [ + | - hh[:mm]]].IllegalArgumentException
public static Calendar parseUTCTimeOnly(byte[] buffer)
UTCTimeOnly
value from buffer
.buffer
- the buffer of bytes
The format for UTCTimeOnly
is HH:MM:SS[.sss].IllegalArgumentException
public static Calendar parseUTCTimeOnly(byte[] buffer, int offset, int length, Calendar cal)
UTCTimeOnly
value from buffer
.buffer
- the buffer of bytes
The format for UTCTimeOnly
is HH:MM:SS[.sss].IllegalArgumentException
public static Calendar parseDate(byte[] buffer, Calendar calendar)
Date
value from buffer
.buffer
- the buffer of bytes
The format for Date
is YYYYMMDD.IllegalArgumentException
public static Calendar parseDate(byte[] buffer, int offset, int length, Calendar calendar)
Date
value from buffer
.buffer
- the buffer of bytes
The format for Date
is YYYYMMDD.IllegalArgumentException
public static Calendar parseDate(byte[] buffer)
Date
value from buffer
.buffer
- the buffer of bytes
The format for Date
is YYYYMMDD.IllegalArgumentException
protected static int parseDatePart(byte[] buffer, int year, int month)
protected static int parseDatePart(byte[] buffer, int offset, int year, int month)
protected static int parseMonthPart(byte[] block)
protected static int parseMonthPart(byte[] block, int offset)
protected static int parseYearPart(byte[] block)
protected static int parseYearPart(byte[] block, int offset)
public static Calendar parseUTCDate(byte[] buffer)
UTCDate
value from buffer
.buffer
- the buffer of bytes
The format for UTCDate
is YYYYMMDD.IllegalArgumentException
public static Calendar parseLocalMktDate(byte[] buffer)
LocalMktDate
value from buffer
.buffer
- the buffer of bytes
The format for LocalMktDate
is YYYYMMDD.IllegalArgumentException
public static Calendar parseMonthYear(byte[] buffer, Calendar calendar)
MonthYear
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for MonthYear
is YYYYMM.IllegalArgumentException
public static Calendar parseMonthYear(byte[] buffer, int offset, int length, Calendar calendar)
MonthYear
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for MonthYear
is YYYYMM.IllegalArgumentException
public static Calendar parseMonthYear(byte[] buffer)
MonthYear
value from buffer
.buffer
- the buffer of bytes
The format for MonthYear
is YYYYMM.IllegalArgumentException
public static Calendar parseTime(byte[] buffer, Calendar calendar)
Time
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for Time
is YYYYMMDD-HH:MM:SS.IllegalArgumentException
public static Calendar parseShortTime(byte[] buffer, Calendar calendar)
Time
value from buffer
.buffer
- the buffer of bytescalendar
- the calendar
The format for Time
is HH:MM:SS.IllegalArgumentException
public static Calendar parseTime(byte[] buffer)
Time
value from buffer
.buffer
- the buffer of bytes
The format for Time
is YYYYMMDD-HH:MM:SS.IllegalArgumentException
public static Period parseTenor(byte[] buffer, int offset, int count)
Tenor
value from buffer
.
The format for Tenor
is ('Dx','Mx','Wx','Yx' where 'x' is any int)buffer
- the buffer of bytesoffset
- the initial offsetIllegalArgumentException
public static byte[] formatUTCTimestamp40(Calendar calendar)
calendar
to the UTCTimestamp40
format.
The format for UTCTimestamp40
is YYYYMMDD-HH:MM:SS.calendar
- the valuepublic static byte[] formatUTCTimestamp(Calendar calendar)
calendar
to the UTCTimestamp
format.
The format for UTCTimestamp
is YYYYMMDD-HH:MM:SS[.sss].calendar
- the valuepublic static void formatUTCTimestampWithMs(Calendar calendar, byte[] sendingTimeBufMs)
calendar
- timestampsendingTimeBufMs
- buffer size must be 21public static void formatUTCTimestampWithoutMs(Calendar calendar, byte[] sendingTimeBufNoMs)
calendar
- timestampsendingTimeBufNoMs
- buffer size must be 17public static byte[] formatUTCTimeOnly(Calendar calendar)
calendar
to the UTCTimeOnly
format.
The format for UTCTimeOnly
is HH:MM:SS[.sss].calendar
- the valuepublic static byte[] formatTZTimeOnly(Calendar calendar)
calendar
to the TZTimeOnly
format.
The format for TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].calendar
- the valuepublic static byte[] formatTZTimestamp(Calendar calendar)
calendar
to the TZTimestamp
format.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS[.sss]][Z | [ + | - hh[:mm]]].calendar
- the calendarpublic static byte[] formatDate(Calendar calendar)
calendar
to the Date
format.
The format for Date
is YYYYMMDD.calendar
- the calendarpublic static byte[] formatUTCDate(Calendar calendar)
calendar
to the UTCDate
format.
The format for UTCDate
is YYYYMMDD.calendar
- the calendarpublic static byte[] formatLocalMktDate(Calendar calendar)
calendar
to the LocalMktDate
format.
The format for LocalMktDate
is YYYYMMDD.calendar
- the calendarpublic static byte[] formatMonthYear(Calendar calendar)
calendar
to the MonthYear
format.
The format for MonthYear
is YYYYMM.calendar
- the calendarpublic static byte[] formatTime(Calendar calendar)
calendar
to the Time
format.
The format for Time
is YYYYMMDD-HH:MM:SS.calendar
- the calendarpublic static long parseInt(byte[] buffer)
integer
value from buffer
.buffer
- the buffer of bytesIllegalArgumentException
public static long parseInt(byte[] buffer, int offset, int count)
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.buffer
- the buffer of bytesoffset
- the initial offsetcount
- the lengthIllegalArgumentException
public static long parseInt(String str, int offset, int count)
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.str
- a string representation of an integer.offset
- the initial offsetcount
- the lengthIllegalArgumentException
public static byte[] formatInt(long value)
value
- the valuepublic static int formatIntLength(long value)
public static int formatInt(long value, byte[] buffer)
public static int formatInt(long value, byte[] buffer, int offset)
public static int formatIntLengthWithPadding(long value, int padLength)
public static int formatIntWithPadding(long value, int padLength, byte[] buffer, int offset)
public static void formatDoubleWithPadding(double value, int precision, int padLength, byte[] buffer, int offset)
public static byte[] formatUInt(long value)
value
- the valuepublic static boolean isInvalidInt(byte[] buffer)
integer
value.buffer
- the buffer of bytespublic static boolean isInvalidInt(byte[] buf, int off, int len)
buf
- - bufferoff
- - buffer offsetlen
- - buffer lengthpublic static byte[] formatCheckSum(int checkSum)
checkSum
- the check sum@Deprecated public static byte[] formatStorageTimestamp(Calendar calendar, byte[] buffer, int offset)
calendar
- buffer
- offset
- public static byte[] formatTimestamp(byte[] buffer, int offset, Calendar calendar, long additionalFractions, TimestampPrecision precision)
public static byte[] formatStorageTimestamp(byte[] buffer, int offset, Calendar calendar, long additionalFractions, TimestampPrecision precision)
@Deprecated public static byte[] formatBackupStorageTimestamp(Calendar calendar)
calendar
- public static byte[] formatBackupStorageTimestamp(byte[] buffer, Calendar calendar, long additionalFractions, TimestampPrecision precision)
Copyright © 2000–2022 EPAM Systems. All rights reserved.