Package dap4.servlet
Class DapSerializer
java.lang.Object
dap4.servlet.DapSerializer
Given a DSP, serialize
possibly constrained data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CDMWrapprotected dap4.core.ce.CEConstraintprotected dap4.core.util.ChecksumModeprotected ByteOrderprotected OutputStreamprotected SerialWriter -
Constructor Summary
ConstructorsConstructorDescriptionDapSerializer(CDMWrap c4, dap4.core.ce.CEConstraint constraint, OutputStream stream, ByteOrder order, dap4.core.util.ChecksumMode mode) Primary constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(dap4.core.dmr.DapDataset dmr) protected voidwriteAtomicVariable(CDMData data, SerialWriter dst) Write out an atomic variable.protected voidwriteRecord(CDMData record, SerialWriter dst) Write out a single Record instance.protected voidwriteSequence(CDMData data, SerialWriter dst) Write out a single or array sequence instanceprotected voidwriteSequence1(CDMData instance, SerialWriter dst) Write out a single Sequence of records (Eventually use any filter in the DapVariable)protected voidwriteStructure(CDMData data, SerialWriter dst) Write out a scalar or array structure instanceprotected voidwriteStructure1(CDMData instance, SerialWriter dst) Write out a single structure instanceprotected voidwriteVariable(CDMData data, SerialWriter dst)
-
Field Details
-
stream
-
writer
-
cdmwrap
-
ce
protected dap4.core.ce.CEConstraint ce -
order
-
checksummode
protected dap4.core.util.ChecksumMode checksummode -
checksums
-
-
Constructor Details
-
DapSerializer
public DapSerializer() -
DapSerializer
public DapSerializer(CDMWrap c4, dap4.core.ce.CEConstraint constraint, OutputStream stream, ByteOrder order, dap4.core.util.ChecksumMode mode) throws IOException Primary constructor- Parameters:
c4- The DSP to writeconstraint- Any applicable constraintstream- Write to this streamorder- The byte order to use- Throws:
IOException
-
-
Method Details
-
getChecksums
-
write
- Throws:
IOException
-
writeVariable
- Parameters:
data- - cursor referencing what to writedst- - where to write- Throws:
IOException
-
writeAtomicVariable
Write out an atomic variable.- Parameters:
data-dst-- Throws:
dap4.core.util.DapExceptionIOException
-
writeStructure
Write out a scalar or array structure instance- Parameters:
data-dst- - where to write- Throws:
dap4.core.util.DapExceptionIOException
-
writeStructure1
Write out a single structure instance- Parameters:
instance-dst- - where to write- Throws:
dap4.core.util.DapExceptionIOException
-
writeSequence
Write out a single or array sequence instance- Parameters:
data-dst- - where to write- Throws:
dap4.core.util.DapExceptionIOException
-
writeSequence1
Write 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
Write out a single Record instance.- Parameters:
record- the record data cursordst- to which to write- Throws:
dap4.core.util.DapExceptionIOException
-