public class BinaryDataWriter extends AbstractDataWriter
Writes CDM binary data stream using the given data components structure and binary encoding information. This supports raw binary and base64 for now.
DataTreeVisitor.Record
Modifier and Type | Field and Description |
---|---|
protected boolean |
componentEncodingResolved |
protected DataOutputExt |
dataOutput |
CHOICE_ERROR, dataTypeUtils, NO_HANDLER_ERROR, stopWriting, STREAM_ERROR
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler
Constructor and Description |
---|
BinaryDataWriter() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
protected void |
processAtom(ScalarComponent component) |
protected boolean |
processBlock(DataComponent blockComponent)
Process an aggregate component
|
void |
reset()
Reset the parser before parsing a new tuple
|
protected void |
resolveComponentEncodings() |
void |
setOutput(OutputStream outputStream) |
setDataComponents, stop, write, write
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 DataOutputExt dataOutput
protected boolean componentEncodingResolved
public void setOutput(OutputStream outputStream) throws IOException
setOutput
in interface DataStreamWriter
setOutput
in class AbstractDataWriter
IOException
public void reset()
DataTreeVisitor
reset
in interface DataStreamWriter
reset
in class DataTreeVisitor
public void close() throws IOException
close
in interface DataStreamWriter
close
in class AbstractDataWriter
IOException
public void flush() throws IOException
flush
in interface DataStreamWriter
flush
in class AbstractDataWriter
IOException
protected void resolveComponentEncodings() throws CDMException
CDMException
protected void processAtom(ScalarComponent component) throws IOException
processAtom
in class AbstractDataWriter
IOException
protected boolean processBlock(DataComponent blockComponent) throws IOException
DataTreeVisitor
processBlock
in class AbstractDataWriter
IOException
Copyright © 2016 Sensia Software LLC. All rights reserved.