Package deltix.qsrv.hf.stream
Class AbstractMessageReader
- java.lang.Object
-
- deltix.qsrv.hf.stream.AbstractMessageReader
-
- All Implemented Interfaces:
TypedMessageSource
- Direct Known Subclasses:
MessageReader2
public class AbstractMessageReader extends java.lang.Object implements TypedMessageSource
Base class for reading InstrumentMessage from persistent data storage
-
-
Field Summary
Fields Modifier and Type Field Description protected deltix.util.memory.MemoryDataInput
buffer
protected byte[]
bytes
protected deltix.qsrv.hf.pub.InstrumentMessage
curMsg
protected int
curTypeCode
protected FixedExternalDecoder[]
decoders
protected static deltix.qsrv.hf.pub.InstrumentType[]
ITYPE_TYPES
protected deltix.qsrv.hf.pub.InstrumentMessage[]
messages
protected RawMessage
rawMsg
protected java.lang.StringBuilder
symbol
protected RecordClassDescriptor[]
types
-
Constructor Summary
Constructors Constructor Description AbstractMessageReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkBuffer(int length)
protected deltix.qsrv.hf.pub.InstrumentMessage
decode(deltix.util.memory.MemoryDataInput buffer)
RecordClassDescriptor
getCurrentType()
Returns the type of the current message.int
getCurrentTypeIndex()
Returns the type index of the current message.deltix.qsrv.hf.pub.InstrumentMessage
getMessage()
RecordClassDescriptor[]
getTypes()
static MessageFileHeader
readHeader(java.io.InputStream in)
static MessageFileHeader
readHeaderWithoutVersion(java.io.InputStream in, byte v)
static byte
readVersion(java.io.InputStream in)
-
-
-
Field Detail
-
ITYPE_TYPES
protected static final deltix.qsrv.hf.pub.InstrumentType[] ITYPE_TYPES
-
decoders
protected FixedExternalDecoder[] decoders
-
messages
protected deltix.qsrv.hf.pub.InstrumentMessage[] messages
-
bytes
protected byte[] bytes
-
buffer
protected final deltix.util.memory.MemoryDataInput buffer
-
symbol
protected final java.lang.StringBuilder symbol
-
types
protected RecordClassDescriptor[] types
-
curMsg
protected deltix.qsrv.hf.pub.InstrumentMessage curMsg
-
rawMsg
protected RawMessage rawMsg
-
curTypeCode
protected int curTypeCode
-
-
Method Detail
-
getMessage
public deltix.qsrv.hf.pub.InstrumentMessage getMessage()
-
readVersion
public static byte readVersion(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
readHeader
public static MessageFileHeader readHeader(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
readHeaderWithoutVersion
public static MessageFileHeader readHeaderWithoutVersion(java.io.InputStream in, byte v) throws java.io.IOException
- Throws:
java.io.IOException
-
checkBuffer
protected void checkBuffer(int length)
-
decode
protected deltix.qsrv.hf.pub.InstrumentMessage decode(deltix.util.memory.MemoryDataInput buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
getTypes
public RecordClassDescriptor[] getTypes()
-
getCurrentTypeIndex
public int getCurrentTypeIndex()
Description copied from interface:TypedMessageSource
Returns the type index of the current message.- Specified by:
getCurrentTypeIndex
in interfaceTypedMessageSource
- Returns:
- The current message type index.
-
getCurrentType
public RecordClassDescriptor getCurrentType()
Description copied from interface:TypedMessageSource
Returns the type of the current message.- Specified by:
getCurrentType
in interfaceTypedMessageSource
- Returns:
- The current message type.
-
-