public class BinaryDataParser extends AbstractDataParser
Parses CDM binary data stream using the data components structure and the binary encoding information.
DataTreeVisitor.Record
Modifier and Type | Field and Description |
---|---|
protected boolean |
componentEncodingResolved |
protected DataInputExt |
dataInput |
protected InputStream |
input |
CHOICE_ERROR, dataTypeUtils, renewDataBlock, stopParsing, STREAM_ERROR
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler
Constructor and Description |
---|
BinaryDataParser() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
initBlockReader(DataComponent blockComponent,
BinaryBlockImpl binaryOpts) |
boolean |
moreData()
Checks if more data is available from the stream
|
DataBlock |
parse() |
void |
parse(InputStream inputStream) |
protected void |
processAtom(ScalarComponent scalarComponent) |
protected boolean |
processBlock(DataComponent blockComponent)
Process an aggregate component
|
void |
reset()
Reset the parser before parsing a new tuple
|
protected void |
resolveComponentEncodings()
Maps a given scalar component to the corresponding BinaryValue
object containing binary encoding information.
|
void |
setInput(InputStream inputStream) |
parse, parse, parseNextBlock, setDataComponents, setRenewDataBlock, stop
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
protected DataInputExt dataInput
protected InputStream input
protected boolean componentEncodingResolved
public void setInput(InputStream inputStream) throws IOException
IOException
public void parse(InputStream inputStream) throws IOException
IOException
public DataBlock parse() throws IOException
IOException
public void reset()
DataTreeVisitor
reset
in interface DataStreamParser
reset
in class AbstractDataParser
protected void resolveComponentEncodings() throws CDMException
CDMException
protected void initBlockReader(DataComponent blockComponent, BinaryBlockImpl binaryOpts) throws CDMException
CDMException
protected void processAtom(ScalarComponent scalarComponent) throws CDMException, IOException
processAtom
in class DataTreeVisitor
CDMException
IOException
protected boolean processBlock(DataComponent blockComponent) throws CDMException, IOException
DataTreeVisitor
processBlock
in class DataTreeVisitor
CDMException
IOException
public boolean moreData() throws IOException
moreData
in class AbstractDataParser
IOException
public void close() throws IOException
IOException
Copyright © 2016 Sensia Software LLC. All rights reserved.