Package org.vast.swe
Class BinaryDataParser
java.lang.Object
org.vast.swe.DataTreeVisitor
org.vast.swe.AbstractDataParser
org.vast.swe.BinaryDataParser
- All Implemented Interfaces:
DataStreamParser
Parses CDM binary data stream using the data components structure and the binary encoding information.
- Since:
- Nov 22, 2005
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vast.swe.DataTreeVisitor
DataTreeVisitor.Record -
Field Summary
FieldsFields inherited from class org.vast.swe.AbstractDataParser
CHOICE_ERROR, dataTypeUtils, renewDataBlock, stopParsing, STREAM_ERRORFields 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 TypeMethodDescriptionvoidclose()protected voidinitBlockReader(DataComponent blockComponent, BinaryBlockImpl binaryOpts) booleanmoreData()Checks if more data is available from the streamparse()voidparse(InputStream inputStream) protected voidprocessAtom(ScalarComponent scalarComponent) Processes a scalar componentprotected booleanprocessBlock(DataComponent blockComponent) Processes an aggregate componentvoidreset()Reset the parser before parsing a new tupleprotected voidMaps a given scalar component to the corresponding BinaryValue object containing binary encoding information.voidsetInput(InputStream inputStream) Methods inherited from class org.vast.swe.AbstractDataParser
parse, parse, parseNextBlock, setDataComponents, setRenewDataBlock, stopMethods inherited from class org.vast.swe.DataTreeVisitor
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.vast.cdm.common.DataStreamParser
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
-
Field Details
-
dataInput
-
input
-
componentEncodingResolved
protected boolean componentEncodingResolved
-
-
Constructor Details
-
BinaryDataParser
public BinaryDataParser()
-
-
Method Details
-
setInput
- Throws:
IOException
-
parse
- Throws:
IOException
-
parse
- Throws:
IOException
-
reset
public void reset()Description copied from class:DataTreeVisitorReset the parser before parsing a new tuple- Specified by:
resetin interfaceDataStreamParser- Overrides:
resetin classAbstractDataParser
-
resolveComponentEncodings
Maps a given scalar component to the corresponding BinaryValue object containing binary encoding information. This also forces the DataValues primitive type to be the same as the ones specified in the binary encoding section.- Throws:
CDMException
-
initBlockReader
protected void initBlockReader(DataComponent blockComponent, BinaryBlockImpl binaryOpts) throws CDMException - Throws:
CDMException
-
moreData
Checks if more data is available from the stream- Specified by:
moreDatain classAbstractDataParser- Returns:
- true if more data needs to be parsed, false otherwise
- Throws:
IOException
-
processAtom
Description copied from class:DataTreeVisitorProcesses a scalar component- Specified by:
processAtomin classDataTreeVisitor- Throws:
IOException
-
processBlock
Description copied from class:DataTreeVisitorProcesses an aggregate component- Specified by:
processBlockin classDataTreeVisitor- Returns:
- true if children should be processed, false otherwise
- Throws:
IOException
-
close
- Throws:
IOException
-