Class FIXTypes
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
formatBackupStorageTimestamp
(byte[] buffer, Calendar calendar, long additionalFractions, TimestampPrecision precision) static byte[]
formatBackupStorageTimestamp
(Calendar calendar) Deprecated.static byte[]
formatBoolean
(boolean value) Formats the booleanvalue
.static byte[]
formatCheckSum
(int checkSum) Formats the check sum.static byte[]
formatDate
(Calendar calendar) Formats the value ofcalendar
to theDate
format.static byte[]
formatDouble
(double value) Deprecated.DoubleFormat.formatstatic 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 ofcalendar
to theLocalMktDate
format.static byte[]
formatMonthYear
(Calendar calendar) Formats the value ofcalendar
to theMonthYear
format.static byte[]
formatMonthYear44
(Calendar calendar) Formats theMonthYear44
value fromcalendar
.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 ofcalendar
to theTime
format.static byte[]
formatTimestamp
(byte[] buffer, int offset, Calendar calendar, long additionalFractions, TimestampPrecision precision) static byte[]
formatTZTimeOnly
(Calendar calendar) Formats the value ofcalendar
to theTZTimeOnly
format.static byte[]
formatTZTimestamp
(Calendar calendar) Formats the value ofcalendar
to theTZTimestamp
format.static byte[]
formatUInt
(long value) Formats the integer value.static byte[]
formatUTCDate
(Calendar calendar) Formats the value ofcalendar
to theUTCDate
format.static byte[]
formatUTCTimeOnly
(Calendar calendar) Formats the value ofcalendar
to theUTCTimeOnly
format.static byte[]
formatUTCTimestamp
(Calendar calendar) Formats the value ofcalendar
to theUTCTimestamp
format.static byte[]
formatUTCTimestamp40
(Calendar calendar) Formats the value ofcalendar
to theUTCTimestamp40
format.static void
formatUTCTimestampWithMs
(Calendar calendar, byte[] sendingTimeBufMs) Format UTC timestamp with include millisecondsstatic void
formatUTCTimestampWithoutMs
(Calendar calendar, byte[] sendingTimeBufNoMs) Format UTC timestamp with include millisecondsstatic boolean
isInvalidBoolean
(byte[] buffer) Returns true, ifbuffer
contains the invalidboolean
value.static boolean
isInvalidBoolean
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidboolean
value.static boolean
isInvalidDate
(byte[] buffer) Returns true, if subarray contains the invalidDate
value.static boolean
isInvalidDate
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidDate
value.static boolean
isInvalidFloat
(byte[] buffer) Returns false, ifbuffer
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 invalidinteger
value.static boolean
isInvalidInt
(byte[] buf, int off, int len) Check if buffer has invalid integer numberstatic boolean
isInvalidLocalMktTime
(byte[] buffer) Returns true, ifbuffer
contains the invalidLocalMktTime
value.static boolean
isInvalidLocalMktTime
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidLocalMktTime
value.static boolean
isInvalidMonthYear
(byte[] buffer) Returns true, if subarray contains the invalidMonthYear
value.static boolean
isInvalidMonthYear
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidMonthYear
value.static boolean
isInvalidMonthYear44
(byte[] buffer) Returns true, if subarray contains the invalidMonthYear44
value.static boolean
isInvalidMonthYear44
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidMonthYear44
value.static boolean
isInvalidTenor
(byte[] buffer) Returns true, ifbuffer
contains the invalidTenor
value.static boolean
isInvalidTenor
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidTenor
value.static boolean
isInvalidTime
(byte[] buffer) Returns true, if subarray contains the invalidTime
value.static boolean
isInvalidTime
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidTime
value.static boolean
isInvalidTimeOnly
(byte[] buffer) Returns true, ifbuffer
contains the invalidTimeOnly
value.static boolean
isInvalidTimeOnly
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidTimeOnly
value.static boolean
isInvalidTimestamp
(byte[] buffer) static boolean
isInvalidTimestamp
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidTimestamp
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 invalidTZTimeOnly
value.static boolean
isInvalidTZTimeOnly
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidTZTimeOnly
value.static boolean
isInvalidTZTimestamp
(byte[] buffer) Returns true, if subarray contains the invalidTZTimestamp
value.static boolean
isInvalidTZTimestamp
(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidTZTimestamp
value.static boolean
parseBoolean
(byte[] buffer) Parses theboolean
value from bytes.static boolean
parseBoolean
(byte[] buffer, int offset, int count) Parses theboolean
value from subarray.static Calendar
parseDate
(byte[] buffer) Parses theDate
value frombuffer
.static Calendar
Parses theDate
value frombuffer
.static Calendar
Parses theDate
value frombuffer
.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 doublestatic long
parseInt
(byte[] buffer) Parses theinteger
value frombuffer
.static long
parseInt
(byte[] buffer, int offset, int count) Parses theinteger
value frombuffer
.static long
Parses theinteger
value fromstr
.static Calendar
parseLocalMktDate
(byte[] buffer) Parses theLocalMktDate
value frombuffer
.static Calendar
parseLocalMktTime
(byte[] buffer, int offset, int length, Calendar calendar) Parses theLocalMktTime
value frombuffer
.protected static int
parseMonthPart
(byte[] block) protected static int
parseMonthPart
(byte[] block, int offset) static Calendar
parseMonthYear
(byte[] buffer) Parses theMonthYear
value frombuffer
.static Calendar
parseMonthYear
(byte[] buffer, int offset, int length, Calendar calendar) Parses theMonthYear
value frombuffer
.static Calendar
parseMonthYear
(byte[] buffer, Calendar calendar) Parses theMonthYear
value frombuffer
.static Calendar
parseMonthYear44
(byte[] buffer) Parses theMonthYear44
value frombuffer
.static Calendar
parseMonthYear44
(byte[] buffer, int offset, int length, Calendar calendar) Parses theMonthYear44
value frombuffer
.static Calendar
parseMonthYear44
(byte[] buffer, Calendar calendar) Parses theMonthYear44
value frombuffer
.protected static int
parseNumberPart
(byte[] block, int off, int limit) static Calendar
parseShortTime
(byte[] buffer, Calendar calendar) Parses theTime
value frombuffer
.static Period
parseTenor
(byte[] buffer, int offset, int count) Parses theTenor
value frombuffer
.static Calendar
parseTime
(byte[] buffer) Parses theTime
value frombuffer
.static Calendar
Parses theTime
value frombuffer
.static Calendar
parseTimeOnly
(byte[] buffer, int offset, int length, Calendar calendar) Parses theTimeOnly
value frombuffer
.static Calendar
parseTimeOnly
(byte[] buffer, Calendar calendar) Parses theTimeOnly
value frombuffer
.static Calendar
parseTimestamp
(byte[] buffer, int offset, int length, Calendar calendar) Parses theTimestamp
value frombuffer
tocalendar
.static Calendar
parseTimestamp
(byte[] buffer, Calendar calendar) Parses theTimestamp
value frombuffer
tocalendar
.static Calendar
parseTimestamp40
(byte[] buffer, Calendar calendar) Parses theTimestamp40
value frombuffer
.static Calendar
parseTZTimeOnly
(byte[] buffer) Parses theTZTimeOnly
value frombuffer
.static Calendar
parseTZTimeOnly
(byte[] buffer, int offset, int length, Calendar calendar) static Calendar
parseTZTimestamp
(byte[] buffer) Parses theTZTimestamp
value frombuffer
.static void
parseTZTimestamp
(byte[] buffer, int offset, int length, Calendar calendar) Parses theTZTimestamp
value frombuffer
.static Calendar
parseUTCDate
(byte[] buffer) Parses theUTCDate
value frombuffer
.static Calendar
parseUTCTimeOnly
(byte[] buffer) Parses theUTCTimeOnly
value frombuffer
.static Calendar
parseUTCTimeOnly
(byte[] buffer, int offset, int length, Calendar cal) Parses theUTCTimeOnly
value frombuffer
.static Calendar
parseUTCTimestamp
(byte[] buffer) Parses theUTCTimestamp
value frombuffer
.static Calendar
parseUTCTimestamp40
(byte[] buffer) Parses theUTCTimestamp40
value frombuffer
.protected static int
parseYearPart
(byte[] block) protected static int
parseYearPart
(byte[] block, int offset)
-
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
-
LOCAL_TIMEZONE
-
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.DoubleFormat.formatFormats thefloat
value.- Parameters:
value
- the value
-
formatDouble
Deprecated. -
formatDoubleLength
Deprecated. -
isInvalidFloat
public static boolean isInvalidFloat(byte[] buffer) Returns false, ifbuffer
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 thecount
argument specifies the length of the subarray.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
parseBoolean
public static boolean parseBoolean(byte[] buffer, int offset, int count) Parses theboolean
value from subarray.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length- Throws:
IllegalArgumentException
-
parseBoolean
public static boolean parseBoolean(byte[] buffer) Parses theboolean
value from bytes.- Parameters:
buffer
- the buffer of bytes- Throws:
IllegalArgumentException
-
formatBoolean
public static byte[] formatBoolean(boolean value) Formats the booleanvalue
.- Parameters:
value
- the value
-
isInvalidBoolean
public static boolean isInvalidBoolean(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidboolean
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
isInvalidBoolean
public static boolean isInvalidBoolean(byte[] buffer) Returns true, ifbuffer
contains the invalidboolean
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 invalidTimestamp
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
isInvalidTZTimestamp
public static boolean isInvalidTZTimestamp(byte[] buffer) Returns true, if subarray contains the invalidTZTimestamp
value.- Parameters:
buffer
- the buffer of bytes
-
isInvalidTZTimestamp
public static boolean isInvalidTZTimestamp(byte[] buffer, int offset, int count) Returns true, if subarray contains the invalidTZTimestamp
value.The
offset
argument is the index of the first byte of the subarray and thecount
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 bytesoffset
- the initial offsetcount
- the length
-
isInvalidTimeOnly
public static boolean isInvalidTimeOnly(byte[] buffer) Returns true, ifbuffer
contains the invalidTimeOnly
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 invalidTimeOnly
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.The format for
TimeOnly
is HH:MM:SS[.sss]- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
isInvalidLocalMktTime
public static boolean isInvalidLocalMktTime(byte[] buffer) Returns true, ifbuffer
contains the invalidLocalMktTime
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 invalidLocalMktTime
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.The format for
LocalMktTime
is HH:MM:SS- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
isInvalidTenor
public static boolean isInvalidTenor(byte[] buffer) Returns true, ifbuffer
contains the invalidTenor
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 invalidTenor
value.The
offset
argument is the index of the first byte of the subarray and thecount
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 bytesoffset
- the initial offsetcount
- the length
-
isInvalidTZTimeOnly
public static boolean isInvalidTZTimeOnly(byte[] buffer) Returns true, if subarray contains the invalidTZTimeOnly
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 invalidTZTimeOnly
value.The
offset
argument is the index of the first byte of the subarray and thecount
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 bytesoffset
- the initial offsetcount
- the length
-
isInvalidDate
public static boolean isInvalidDate(byte[] buffer) Returns true, if subarray contains the invalidDate
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 invalidDate
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.The format for
Date
is yyyymmdd.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
isInvalidMonthYear
public static boolean isInvalidMonthYear(byte[] buffer) Returns true, if subarray contains the invalidMonthYear
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 invalidMonthYear
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.The format for
MonthYear
is YYYYMM.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
isInvalidMonthYear44
public static boolean isInvalidMonthYear44(byte[] buffer) Returns true, if subarray contains the invalidMonthYear44
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 invalidMonthYear44
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.The format for
MonthYear
are YYYYMM,YYYYMMDD and YYYYMMWW.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
parseMonthYear44
Parses theMonthYear44
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.- Throws:
IllegalArgumentException
-
parseMonthYear44
Parses theMonthYear44
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.- Throws:
IllegalArgumentException
-
parseMonthYear44
Parses theMonthYear44
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.- Throws:
IllegalArgumentException
-
formatMonthYear44
Formats theMonthYear44
value fromcalendar
.- Parameters:
calendar
- the calendarThe format for
MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.- Throws:
IllegalArgumentException
-
isInvalidTime
public static boolean isInvalidTime(byte[] buffer) Returns true, if subarray contains the invalidTime
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 invalidTime
value.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.The format for
Time
is YYYYMMDD-HH:MM:SS.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length
-
parseTimestamp40
Parses theTimestamp40
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
Timestamp40
is YYYYMMDD-HH:MM:SS- Throws:
IllegalArgumentException
-
parseTimestamp
Parses theTimestamp
value frombuffer
tocalendar
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
Timestamp
is YYYYMMDD-HH:MM:SS[.sss]- Throws:
IllegalArgumentException
-
parseTimestamp
Parses theTimestamp
value frombuffer
tocalendar
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
Timestamp
is YYYYMMDD-HH:MM:SS[.sss]- Throws:
IllegalArgumentException
-
parseUTCTimestamp
Parses theUTCTimestamp
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
UTCTimestamp
is YYYYMMDD-HH:MM:SS[.sss]- Throws:
IllegalArgumentException
-
parseUTCTimestamp40
Parses theUTCTimestamp40
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
UTCTimestamp40
is YYYYMMDD-HH:MM:SS- Throws:
IllegalArgumentException
-
parseTimeOnly
Parses theTimeOnly
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
TimeOnly
is HH:MM:SS[.sss]- Throws:
IllegalArgumentException
-
parseTimeOnly
Parses theTimeOnly
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
TimeOnly
is HH:MM:SS[.sss]- Throws:
IllegalArgumentException
-
parseLocalMktTime
Parses theLocalMktTime
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
LocalMktTime
is HH:MM:SS- Throws:
IllegalArgumentException
-
parseTZTimeOnly
Parses theTZTimeOnly
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]- Throws:
IllegalArgumentException
-
parseTZTimeOnly
-
parseTZTimestamp
Parses theTZTimestamp
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
TZTimeOnly
is YYYYMMDD-HH:MM[:SS][Z | [ + | - hh[:mm]]].- Throws:
IllegalArgumentException
-
parseTZTimestamp
Parses theTZTimestamp
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
TZTimestamp
is YYYYMMDD-HH:MM[:SS][Z | [ + | - hh[:mm]]].- Throws:
IllegalArgumentException
-
parseUTCTimeOnly
Parses theUTCTimeOnly
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
UTCTimeOnly
is HH:MM:SS[.sss].- Throws:
IllegalArgumentException
-
parseUTCTimeOnly
Parses theUTCTimeOnly
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
UTCTimeOnly
is HH:MM:SS[.sss].- Throws:
IllegalArgumentException
-
parseDate
Parses theDate
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
Date
is YYYYMMDD.- Throws:
IllegalArgumentException
-
parseDate
Parses theDate
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
Date
is YYYYMMDD.- Throws:
IllegalArgumentException
-
parseDate
Parses theDate
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe 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
Parses theUTCDate
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
UTCDate
is YYYYMMDD.- Throws:
IllegalArgumentException
-
parseLocalMktDate
Parses theLocalMktDate
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
LocalMktDate
is YYYYMMDD.- Throws:
IllegalArgumentException
-
parseMonthYear
Parses theMonthYear
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
MonthYear
is YYYYMM.- Throws:
IllegalArgumentException
-
parseMonthYear
Parses theMonthYear
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
MonthYear
is YYYYMM.- Throws:
IllegalArgumentException
-
parseMonthYear
Parses theMonthYear
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
MonthYear
is YYYYMM.- Throws:
IllegalArgumentException
-
parseTime
Parses theTime
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
Time
is YYYYMMDD-HH:MM:SS.- Throws:
IllegalArgumentException
-
parseShortTime
Parses theTime
value frombuffer
.- Parameters:
buffer
- the buffer of bytescalendar
- the calendarThe format for
Time
is HH:MM:SS.- Throws:
IllegalArgumentException
-
parseTime
Parses theTime
value frombuffer
.- Parameters:
buffer
- the buffer of bytesThe format for
Time
is YYYYMMDD-HH:MM:SS.- Returns:
- the calendar
- Throws:
IllegalArgumentException
-
parseTenor
Parses theTenor
value frombuffer
. The format forTenor
is ('Dx','Mx','Wx','Yx' where 'x' is any int)- Parameters:
buffer
- the buffer of bytesoffset
- the initial offset- Returns:
- the local time structured from the given buffer
- Throws:
IllegalArgumentException
-
formatUTCTimestamp40
Formats the value ofcalendar
to theUTCTimestamp40
format.The format for
UTCTimestamp40
is YYYYMMDD-HH:MM:SS.- Parameters:
calendar
- the value
-
formatUTCTimestamp
Formats the value ofcalendar
to theUTCTimestamp
format.The format for
UTCTimestamp
is YYYYMMDD-HH:MM:SS[.sss].- Parameters:
calendar
- the value
-
formatUTCTimestampWithMs
Format UTC timestamp with include milliseconds- Parameters:
calendar
- timestampsendingTimeBufMs
- buffer size must be 21
-
formatUTCTimestampWithoutMs
Format UTC timestamp with include milliseconds- Parameters:
calendar
- timestampsendingTimeBufNoMs
- buffer size must be 17
-
formatUTCTimeOnly
Formats the value ofcalendar
to theUTCTimeOnly
format.The format for
UTCTimeOnly
is HH:MM:SS[.sss].- Parameters:
calendar
- the value
-
formatTZTimeOnly
Formats the value ofcalendar
to theTZTimeOnly
format.The format for
TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].- Parameters:
calendar
- the value
-
formatTZTimestamp
Formats the value ofcalendar
to theTZTimestamp
format.The format for
TZTimestamp
is YYYYMMDD-HH:MM[:SS[.sss]][Z | [ + | - hh[:mm]]].- Parameters:
calendar
- the calendar
-
formatDate
Formats the value ofcalendar
to theDate
format.The format for
Date
is YYYYMMDD.- Parameters:
calendar
- the calendar
-
formatUTCDate
Formats the value ofcalendar
to theUTCDate
format.The format for
UTCDate
is YYYYMMDD.- Parameters:
calendar
- the calendar
-
formatLocalMktDate
Formats the value ofcalendar
to theLocalMktDate
format.The format for
LocalMktDate
is YYYYMMDD.- Parameters:
calendar
- the calendar
-
formatMonthYear
Formats the value ofcalendar
to theMonthYear
format.The format for
MonthYear
is YYYYMM.- Parameters:
calendar
- the calendar
-
formatTime
Formats the value ofcalendar
to theTime
format.The format for
Time
is YYYYMMDD-HH:MM:SS.- Parameters:
calendar
- the calendar
-
parseInt
public static long parseInt(byte[] buffer) Parses theinteger
value frombuffer
.- Parameters:
buffer
- the buffer of bytes- Throws:
IllegalArgumentException
-
parseInt
public static long parseInt(byte[] buffer, int offset, int count) Parses theinteger
value frombuffer
.The
offset
argument is the index of the first byte of the subarray and thecount
argument specifies the length of the subarray.- Parameters:
buffer
- the buffer of bytesoffset
- the initial offsetcount
- the length- Throws:
IllegalArgumentException
-
parseInt
Parses theinteger
value fromstr
.The
offset
argument is the index of the first char of the substring and thecount
argument specifies the length of the substring.- Parameters:
str
- a string representation of an integer.offset
- the initial offsetcount
- 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 invalidinteger
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
- - bufferoff
- - buffer offsetlen
- - 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.Format backup storage timestamp with default millisecond precision- Parameters:
calendar
-- Returns:
-
formatBackupStorageTimestamp
public static byte[] formatBackupStorageTimestamp(byte[] buffer, Calendar calendar, long additionalFractions, TimestampPrecision precision)
-