Package deltix.qsrv.hf.stream
Class Protocol
- java.lang.Object
-
- deltix.qsrv.hf.stream.Protocol
-
public class Protocol extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
CUSTOM_BAR_CODE
static int
CUSTOM_BAR_CODE2
static int
DAY_BAR_CODE
static int
HOUR_BAR_CODE
static byte[]
MAGIC
static long
MAX_TIME
static int
MINUTE_BAR_CODE
static java.lang.String
NEW_NS
static java.lang.String
OLD_NS
static int
SECOND_BAR_CODE
static byte
VERSION
-
Constructor Summary
Constructors Constructor Description Protocol()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
createReader(java.io.File f, RecordClassDescriptor[] types)
static TypeLoader
getDefaultTypeLoader()
static long
getStartTime(java.io.File file)
static byte
getVersion(java.io.File f)
static boolean
isDeflatedMessageStream(java.io.File f)
static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
openMarketMessagesReader(java.io.File f)
static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
openRawReader(java.io.File f)
static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
openReader(java.io.File f, int bufferSize, TypeLoader loader)
static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
openReader(java.io.File f, TypeLoader loader)
static MessageFileHeader
readHeader(java.io.File file)
static MessageFileHeader
readHeader(java.io.InputStream inputStream)
static void
writeTypes(java.io.DataOutputStream out, RecordClassDescriptor[] rcd)
-
-
-
Field Detail
-
OLD_NS
public static final java.lang.String OLD_NS
- See Also:
- Constant Field Values
-
NEW_NS
public static final java.lang.String NEW_NS
- See Also:
- Constant Field Values
-
MAGIC
public static final byte[] MAGIC
-
VERSION
public static final byte VERSION
- See Also:
- Constant Field Values
-
SECOND_BAR_CODE
public static final int SECOND_BAR_CODE
- See Also:
- Constant Field Values
-
MINUTE_BAR_CODE
public static final int MINUTE_BAR_CODE
- See Also:
- Constant Field Values
-
HOUR_BAR_CODE
public static final int HOUR_BAR_CODE
- See Also:
- Constant Field Values
-
DAY_BAR_CODE
public static final int DAY_BAR_CODE
- See Also:
- Constant Field Values
-
CUSTOM_BAR_CODE
public static final int CUSTOM_BAR_CODE
- See Also:
- Constant Field Values
-
CUSTOM_BAR_CODE2
public static final int CUSTOM_BAR_CODE2
- See Also:
- Constant Field Values
-
MAX_TIME
public static long MAX_TIME
-
-
Method Detail
-
isDeflatedMessageStream
public static boolean isDeflatedMessageStream(java.io.File f)
-
getVersion
public static byte getVersion(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTypes
public static void writeTypes(java.io.DataOutputStream out, RecordClassDescriptor[] rcd) throws java.io.IOException
- Throws:
java.io.IOException
-
getDefaultTypeLoader
public static TypeLoader getDefaultTypeLoader()
-
openMarketMessagesReader
public static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage> openMarketMessagesReader(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
openRawReader
public static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage> openRawReader(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
openReader
public static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage> openReader(java.io.File f, TypeLoader loader) throws java.io.IOException
- Throws:
java.io.IOException
-
openReader
public static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage> openReader(java.io.File f, int bufferSize, TypeLoader loader) throws java.io.IOException
- Throws:
java.io.IOException
-
createReader
public static deltix.data.stream.ConsumableMessageSource<deltix.qsrv.hf.pub.InstrumentMessage> createReader(java.io.File f, RecordClassDescriptor[] types) throws java.io.IOException
- Throws:
java.io.IOException
-
readHeader
public static MessageFileHeader readHeader(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
readHeader
public static MessageFileHeader readHeader(java.io.InputStream inputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
getStartTime
public static long getStartTime(java.io.File file) throws java.io.IOException
- Parameters:
file
- file- Returns:
- timestamp of the first message stored in the file with given fullFileName. Used by QuantOfficeBlotter
- Throws:
java.io.IOException
- if the any IO error occurs
-
-