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.MemoryDataInputbufferprotected byte[]bytesprotected deltix.qsrv.hf.pub.InstrumentMessagecurMsgprotected intcurTypeCodeprotected FixedExternalDecoder[]decodersprotected static deltix.qsrv.hf.pub.InstrumentType[]ITYPE_TYPESprotected deltix.qsrv.hf.pub.InstrumentMessage[]messagesprotected RawMessagerawMsgprotected java.lang.StringBuildersymbolprotected RecordClassDescriptor[]types
-
Constructor Summary
Constructors Constructor Description AbstractMessageReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckBuffer(int length)protected deltix.qsrv.hf.pub.InstrumentMessagedecode(deltix.util.memory.MemoryDataInput buffer)RecordClassDescriptorgetCurrentType()Returns the type of the current message.intgetCurrentTypeIndex()Returns the type index of the current message.deltix.qsrv.hf.pub.InstrumentMessagegetMessage()RecordClassDescriptor[]getTypes()static MessageFileHeaderreadHeader(java.io.InputStream in)static MessageFileHeaderreadHeaderWithoutVersion(java.io.InputStream in, byte v)static bytereadVersion(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:TypedMessageSourceReturns the type index of the current message.- Specified by:
getCurrentTypeIndexin interfaceTypedMessageSource- Returns:
- The current message type index.
-
getCurrentType
public RecordClassDescriptor getCurrentType()
Description copied from interface:TypedMessageSourceReturns the type of the current message.- Specified by:
getCurrentTypein interfaceTypedMessageSource- Returns:
- The current message type.
-
-