Package org.vast.swe
Class BinaryDataWriter
java.lang.Object
org.vast.swe.DataTreeVisitor
org.vast.swe.AbstractDataWriter
org.vast.swe.BinaryDataWriter
- All Implemented Interfaces:
DataStreamWriter
Writes CDM binary data stream using the given data components structure and binary encoding information. This supports raw binary and base64 for now.
- Since:
- Feb 10, 2006
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vast.swe.DataTreeVisitor
DataTreeVisitor.Record
-
Field Summary
FieldsFields inherited from class org.vast.swe.AbstractDataWriter
CHOICE_ERROR, dataTypeUtils, NO_HANDLER_ERROR, stopWriting, STREAM_ERROR
Fields inherited from class org.vast.swe.DataTreeVisitor
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
protected void
processAtom
(ScalarComponent component) Processes a scalar componentprotected boolean
processBlock
(DataComponent blockComponent) Processes an aggregate componentvoid
reset()
Reset the parser before parsing a new tupleprotected void
void
setOutput
(OutputStream outputStream) Methods inherited from class org.vast.swe.AbstractDataWriter
endStream, setDataComponents, startStream, stop, write, write
Methods inherited from class org.vast.swe.DataTreeVisitor
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.vast.cdm.common.DataStreamWriter
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
-
Field Details
-
dataOutput
-
componentEncodingResolved
protected boolean componentEncodingResolved
-
-
Constructor Details
-
BinaryDataWriter
public BinaryDataWriter()
-
-
Method Details
-
setOutput
- Specified by:
setOutput
in interfaceDataStreamWriter
- Specified by:
setOutput
in classAbstractDataWriter
- Throws:
IOException
-
reset
public void reset()Description copied from class:DataTreeVisitor
Reset the parser before parsing a new tuple- Specified by:
reset
in interfaceDataStreamWriter
- Overrides:
reset
in classDataTreeVisitor
-
close
- Specified by:
close
in interfaceDataStreamWriter
- Specified by:
close
in classAbstractDataWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceDataStreamWriter
- Specified by:
flush
in classAbstractDataWriter
- Throws:
IOException
-
resolveComponentEncodings
- Throws:
CDMException
-
processAtom
Description copied from class:DataTreeVisitor
Processes a scalar component- Specified by:
processAtom
in classAbstractDataWriter
- Throws:
IOException
-
processBlock
Description copied from class:DataTreeVisitor
Processes an aggregate component- Specified by:
processBlock
in classAbstractDataWriter
- Returns:
- true if children should be processed, false otherwise
- Throws:
IOException
-