Package dap4.servlet
Class DapSerializer
- java.lang.Object
-
- dap4.servlet.DapSerializer
-
-
Field Summary
Fields Modifier and Type Field Description protected dap4.core.ce.CEConstraintceprotected dap4.core.data.ChecksumModechecksummodeprotected dap4.core.data.DSPdspprotected ByteOrderorderprotected OutputStreamstreamprotected SerialWriterwriter
-
Constructor Summary
Constructors Constructor Description DapSerializer()DapSerializer(dap4.core.data.DSP dsp, dap4.core.ce.CEConstraint constraint, OutputStream stream, ByteOrder order, dap4.core.data.ChecksumMode mode)Primary constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(dap4.core.dmr.DapDataset dmr)protected voidwriteAtomicVariable(dap4.core.data.DataCursor data, SerialWriter dst)Write out an atomic variable.protected voidwriteRecord(dap4.core.data.DataCursor record, SerialWriter dst)Write out a single Record instance.protected voidwriteSequence(dap4.core.data.DataCursor data, SerialWriter dst)Write out a single or array sequence instanceprotected voidwriteSequence1(dap4.core.data.DataCursor instance, SerialWriter dst)Write out a single Sequence of records (Eventually use any filter in the DapVariable)protected voidwriteStructure(dap4.core.data.DataCursor data, SerialWriter dst)Write out a scalar or array structure instanceprotected voidwriteStructure1(dap4.core.data.DataCursor instance, SerialWriter dst)Write out a single structure instanceprotected voidwriteVariable(dap4.core.data.DataCursor data, SerialWriter dst)
-
-
-
Field Detail
-
stream
protected OutputStream stream
-
writer
protected SerialWriter writer
-
dsp
protected dap4.core.data.DSP dsp
-
ce
protected dap4.core.ce.CEConstraint ce
-
order
protected ByteOrder order
-
checksummode
protected dap4.core.data.ChecksumMode checksummode
-
-
Constructor Detail
-
DapSerializer
public DapSerializer()
-
DapSerializer
public DapSerializer(dap4.core.data.DSP dsp, dap4.core.ce.CEConstraint constraint, OutputStream stream, ByteOrder order, dap4.core.data.ChecksumMode mode) throws IOExceptionPrimary constructor- Parameters:
dsp- The DSP to writeconstraint- Any applicable constraintstream- Write to this streamorder- The byte order to use- Throws:
IOException
-
-
Method Detail
-
write
public void write(dap4.core.dmr.DapDataset dmr) throws IOException- Throws:
IOException
-
writeVariable
protected void writeVariable(dap4.core.data.DataCursor data, SerialWriter dst) throws IOException- Parameters:
data- - cursor referencing what to writedst- - where to write- Throws:
IOException
-
writeAtomicVariable
protected void writeAtomicVariable(dap4.core.data.DataCursor data, SerialWriter dst) throws IOExceptionWrite out an atomic variable.- Parameters:
data-dst-- Throws:
dap4.core.util.DapExceptionIOException
-
writeStructure
protected void writeStructure(dap4.core.data.DataCursor data, SerialWriter dst) throws IOExceptionWrite out a scalar or array structure instance- Parameters:
data-dst- - where to write- Throws:
dap4.core.util.DapExceptionIOException
-
writeStructure1
protected void writeStructure1(dap4.core.data.DataCursor instance, SerialWriter dst) throws IOExceptionWrite out a single structure instance- Parameters:
instance-dst- - where to write- Throws:
dap4.core.util.DapExceptionIOException
-
writeSequence
protected void writeSequence(dap4.core.data.DataCursor data, SerialWriter dst) throws IOExceptionWrite out a single or array sequence instance- Parameters:
data-dst- - where to write- Throws:
dap4.core.util.DapExceptionIOException
-
writeSequence1
protected void writeSequence1(dap4.core.data.DataCursor instance, SerialWriter dst) throws IOExceptionWrite out a single Sequence of records (Eventually use any filter in the DapVariable)- Parameters:
instance- the sequence instancedst- write target- Throws:
dap4.core.util.DapExceptionIOException
-
writeRecord
protected void writeRecord(dap4.core.data.DataCursor record, SerialWriter dst) throws IOExceptionWrite out a single Record instance.- Parameters:
record- the record data cursordst- to which to write- Throws:
dap4.core.util.DapExceptionIOException
-
-