|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.fix.message.RawFIXUtil
public final class RawFIXUtil
Raw fix util helper class. Date: Sep 7, 2008
Nested Class Summary | |
---|---|
static interface |
RawFIXUtil.RawTags
|
Field Summary | |
---|---|
static DefaultRawTags |
DEFAULT_RAW_TAGS
|
Method Summary | |
---|---|
static byte[] |
copyValue(byte[] message,
int valueStartIndex,
int length)
|
static byte[] |
copyValueUsePool(byte[] message,
int valueStartIndex,
int length)
|
static RawFIXUtil.RawTags |
createRawTags(int[] rawTags)
Creates RawTags from array of int. |
static RawFIXUtil.RawTags |
createRawTags(String rawTags)
Creates RawTags from string. |
static List<byte[]> |
getAllRawValues(byte[] buffer,
int offset,
int length,
int tag)
Gets the value from buffer as bytes. |
static int |
getChecksum(byte[] bytes)
Calculates checksum in array of bytes. |
static int |
getChecksum(byte[][] bytes,
int offset,
int length)
Calculates checksum in matrix of bytes. |
static int |
getChecksum(byte[] bytes,
int offset,
int length)
Calculates checksum in array of bytes. |
static FIXFieldList |
getFIXFieldList(byte[] message)
Parses fix message from array of bytes. |
static FIXFieldList |
getFIXFieldList(byte[] message,
boolean usePool,
boolean isUserOwned)
|
static FIXFieldList |
getFIXFieldList(byte[] message,
int[] rawTags)
Parses fix message from array of bytes. |
static FIXFieldList |
getFIXFieldList(byte[] buffer,
int messageOffset,
int messageLength)
|
static FIXFieldList |
getFIXFieldList(byte[] message,
int messageOffset,
int messageLength,
int[] rawTags)
Parses fix message from array of bytes. |
static FIXFieldList |
getFIXFieldList(byte[] message,
int messageOffset,
int messageLength,
RawFIXUtil.RawTags rawTags)
|
static FIXFieldList |
getFIXFieldList(byte[] message,
int messageOffset,
int messageLength,
RawFIXUtil.RawTags rawTags,
boolean allocateFromPool,
boolean isUserOwned)
Parses fix message from array of bytes. |
static FIXFieldList |
getFIXFieldList(byte[] message,
RawFIXUtil.RawTags rawTags)
|
static FIXFieldList |
getFIXFieldList(FIXFieldList list,
byte[] message,
int messageOffset,
int messageLength,
RawFIXUtil.RawTags rawTags)
|
static FIXFieldList |
getFIXFieldList(FIXFieldList list,
byte[] message,
int messageOffset,
int messageLength,
RawFIXUtil.RawTags rawTags,
boolean clearTheMessageBeforeUse)
|
static FIXFieldList |
getFIXFieldList(FIXFieldList target,
MsgBuf buf,
RawFIXUtil.RawTags rawTags,
boolean clearTheMessageBeforeUse)
|
static FIXFieldList |
getFIXFieldList(MsgBuf buf)
|
static FIXFieldList |
getFIXFieldList(MsgBuf buf,
RawFIXUtil.RawTags rawTags)
|
static FIXFieldList |
getFIXFieldListUntilTagsExists(byte[] message,
int messageOffset,
int messageLength,
RawFIXUtil.RawTags rawTags)
Parses fix message from array of bytes. |
static FIXFieldList |
getFIXFieldListUtilTagsExists(byte[] message)
Parses fix message from array of bytes. |
static long |
getLongValue(byte[] buffer,
int offset,
int length,
int tag)
Gets the value from buffer as long. |
static long |
getLongValue(byte[] buffer,
int offset,
int length,
int tag,
boolean searchFromStart)
Gets the value from buffer as long. |
static byte[] |
getMessageType(byte[] bytes)
Gets the message type. |
static byte[] |
getMessageType(byte[] bytes,
int offset,
int length)
Gets the message type. |
static int |
getRawTagLengthFromPreviousField(FIXFieldList list)
|
static byte[] |
getRawValue(byte[] buffer,
int offset,
int length,
int tag)
Gets the value from buffer as bytes. |
static byte[] |
getRawValue(byte[] buffer,
int offset,
int length,
int tag,
boolean searchFromStart)
Gets the value from buffer as bytes. |
static long |
getSequenceNumber(byte[] message)
Gets sequence number. |
static long |
getSequenceNumber(byte[] message,
int offset,
int length)
Gets sequence number. |
static boolean |
isLogon(byte[] msgType)
Checks if message type is Logon. |
static boolean |
isLogon(String msgType)
Checks if message type is Logon. |
static boolean |
isSessionLevelMessage(byte[] message)
Checks the message session level type. |
static boolean |
isSessionLevelMessage(byte[] message,
int offset,
int length)
Checks the message session level type. |
static boolean |
isSessionLevelMessage(FIXFieldList message)
|
static boolean |
isSessionLevelType(byte[] msgType)
Checks the message session level type. |
static boolean |
isSessionLevelType(byte msgType,
int length)
|
static boolean |
isSessionLevelType(String msgType)
Checks the message session level type. |
static boolean |
isWithinRawTags(int[] rawTags,
int tag)
Deprecated. use RawFIXUtil.createRawTags() instead |
static void |
returnObj(FIXField field)
|
static void |
returnObj(FIXFieldList fieldList)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DefaultRawTags DEFAULT_RAW_TAGS
Method Detail |
---|
public static int getChecksum(byte[] bytes)
bytes
- - array of bytespublic static int getChecksum(byte[] bytes, int offset, int length)
bytes
- the array of bytesoffset
- the offset in array of byteslength
- the length of bytespublic static int getChecksum(byte[][] bytes, int offset, int length)
bytes
- the array of bytesoffset
- the offset in array of byteslength
- the length of bytespublic static byte[] getRawValue(byte[] buffer, int offset, int length, int tag)
buffer
- the buffer of bytesoffset
- the offset in bufferlength
- the buffer lengthtag
- the tag idpublic static byte[] getRawValue(byte[] buffer, int offset, int length, int tag, boolean searchFromStart)
buffer
- the buffer of bytesoffset
- the offset in bufferlength
- the buffer lengthtag
- the tag idsearchFromStart
- search from start or end of the given bufferpublic static List<byte[]> getAllRawValues(byte[] buffer, int offset, int length, int tag)
buffer
- the buffer of bytesoffset
- the offset in bufferlength
- the buffer lengthtag
- the tag idpublic static long getLongValue(byte[] buffer, int offset, int length, int tag)
buffer
- the buffer of bytesoffset
- the offset in bufferlength
- the buffer lengthtag
- the tag id
RuntimeException
- if tag not existspublic static long getLongValue(byte[] buffer, int offset, int length, int tag, boolean searchFromStart)
buffer
- the buffer of bytesoffset
- the offset in bufferlength
- the buffer lengthtag
- the tag idsearchFromStart
- search from the start or end buffer
RuntimeException
- if tag not existspublic static long getSequenceNumber(byte[] message)
message
- the buffer of bytes
RuntimeException
- if tag not existspublic static long getSequenceNumber(byte[] message, int offset, int length)
message
- the buffer of bytes
RuntimeException
- if tag not existspublic static FIXFieldList getFIXFieldList(byte[] buffer, int messageOffset, int messageLength)
public static FIXFieldList getFIXFieldList(MsgBuf buf)
public static FIXFieldList getFIXFieldList(MsgBuf buf, RawFIXUtil.RawTags rawTags)
public static FIXFieldList getFIXFieldList(FIXFieldList target, MsgBuf buf, RawFIXUtil.RawTags rawTags, boolean clearTheMessageBeforeUse)
public static FIXFieldList getFIXFieldList(byte[] message)
message
- the buffer of bytes
GarbledMessageException
- - if message is garbledpublic static FIXFieldList getFIXFieldList(byte[] message, boolean usePool, boolean isUserOwned)
public static FIXFieldList getFIXFieldListUtilTagsExists(byte[] message)
message
- the buffer of bytes
GarbledMessageException
- - if message is garbledpublic static FIXFieldList getFIXFieldList(byte[] message, int[] rawTags)
message
- the buffer of bytesrawTags
- the raw tags
GarbledMessageException
- - if message is garbledpublic static FIXFieldList getFIXFieldList(byte[] message, RawFIXUtil.RawTags rawTags)
public static FIXFieldList getFIXFieldList(byte[] message, int messageOffset, int messageLength, int[] rawTags)
message
- the buffer of bytesrawTags
- the raw tags
GarbledMessageException
- - if message is garbledpublic static FIXFieldList getFIXFieldList(byte[] message, int messageOffset, int messageLength, RawFIXUtil.RawTags rawTags)
public static FIXFieldList getFIXFieldList(byte[] message, int messageOffset, int messageLength, RawFIXUtil.RawTags rawTags, boolean allocateFromPool, boolean isUserOwned)
message
- the buffer of bytesrawTags
- the raw tags
GarbledMessageException
- - if message is garbledpublic static FIXFieldList getFIXFieldList(FIXFieldList list, byte[] message, int messageOffset, int messageLength, RawFIXUtil.RawTags rawTags)
public static FIXFieldList getFIXFieldList(FIXFieldList list, byte[] message, int messageOffset, int messageLength, RawFIXUtil.RawTags rawTags, boolean clearTheMessageBeforeUse)
public static FIXFieldList getFIXFieldListUntilTagsExists(byte[] message, int messageOffset, int messageLength, RawFIXUtil.RawTags rawTags)
message
- the buffer of bytesrawTags
- the raw tags
GarbledMessageException
- - if message is garbledpublic static void returnObj(FIXField field)
public static void returnObj(FIXFieldList fieldList)
public static byte[] copyValueUsePool(byte[] message, int valueStartIndex, int length)
public static byte[] copyValue(byte[] message, int valueStartIndex, int length)
public static int getRawTagLengthFromPreviousField(FIXFieldList list)
@Deprecated public static boolean isWithinRawTags(int[] rawTags, int tag)
rawTags
- the array of tagstag
- the tag id
public static byte[] getMessageType(byte[] bytes)
bytes
- the messagepublic static byte[] getMessageType(byte[] bytes, int offset, int length)
bytes
- the messagepublic static boolean isSessionLevelMessage(byte[] message, int offset, int length)
message
- the fix message
public static boolean isSessionLevelMessage(byte[] message)
message
- the fix message
public static boolean isSessionLevelMessage(FIXFieldList message)
public static boolean isSessionLevelType(String msgType)
msgType
- the message type
public static boolean isSessionLevelType(byte[] msgType)
msgType
- the fix message
public static boolean isSessionLevelType(byte msgType, int length)
public static boolean isLogon(String msgType)
msgType
- the message type, parameter must be not null
public static boolean isLogon(byte[] msgType)
msgType
- the message type, parameter must be not null
public static RawFIXUtil.RawTags createRawTags(int[] rawTags)
rawTags
-
public static RawFIXUtil.RawTags createRawTags(String rawTags)
rawTags
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |