public abstract class AbstractDataWriter extends DataTreeVisitor implements DataStreamWriter
Abstract class for writing a CDM data stream.
DataTreeVisitor.Record
Modifier and Type | Field and Description |
---|---|
protected static String |
CHOICE_ERROR |
protected SWEDataTypeUtils |
dataTypeUtils |
protected static String |
NO_HANDLER_ERROR |
protected boolean |
stopWriting |
protected static String |
STREAM_ERROR |
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler
Constructor and Description |
---|
AbstractDataWriter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close() |
abstract void |
flush() |
protected abstract void |
processAtom(ScalarComponent component) |
protected abstract boolean |
processBlock(DataComponent component)
Process an aggregate component
|
void |
setDataComponents(DataComponent dataInfo) |
abstract void |
setOutput(OutputStream os) |
void |
stop() |
void |
write(DataBlock dataBlock) |
void |
write(OutputStream outputStream) |
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
protected static final String STREAM_ERROR
protected static final String CHOICE_ERROR
protected static final String NO_HANDLER_ERROR
protected SWEDataTypeUtils dataTypeUtils
protected boolean stopWriting
public abstract void setOutput(OutputStream os) throws IOException
setOutput
in interface DataStreamWriter
IOException
public abstract void close() throws IOException
close
in interface DataStreamWriter
IOException
public abstract void flush() throws IOException
flush
in interface DataStreamWriter
IOException
protected abstract void processAtom(ScalarComponent component) throws IOException
processAtom
in class DataTreeVisitor
IOException
protected abstract boolean processBlock(DataComponent component) throws IOException
DataTreeVisitor
processBlock
in class DataTreeVisitor
IOException
public void write(OutputStream outputStream) throws IOException
write
in interface DataStreamWriter
IOException
public void write(DataBlock dataBlock) throws IOException
write
in interface DataStreamWriter
IOException
public void stop()
stop
in interface DataStreamWriter
public void setDataComponents(DataComponent dataInfo)
setDataComponents
in interface DataStreamWriter
setDataComponents
in class DataTreeVisitor
Copyright © 2016 Sensia Software LLC. All rights reserved.