public class D4DataCompiler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected dap4.core.data.ChecksumMode |
checksummode |
static int |
COUNTSIZE |
protected ByteBuffer |
databuffer |
protected dap4.core.dmr.DapDataset |
dataset |
static boolean |
DEBUG |
protected D4DSP |
dsp |
protected ByteOrder |
order |
| Constructor and Description |
|---|
D4DataCompiler(D4DSP dsp,
dap4.core.data.ChecksumMode checksummode,
ByteOrder order,
ByteBuffer databuffer)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
compile()
The goal here is to process the serialized
databuffer and locate top-level variable positions
in the serialized databuffer.
|
protected D4Cursor |
compileAtomicVar(dap4.core.dmr.DapVariable var,
D4Cursor container) |
D4Cursor |
compileSequence(dap4.core.dmr.DapVariable var,
dap4.core.dmr.DapSequence dapseq,
D4Cursor container)
Compile a sequence as a set of records.
|
protected D4Cursor |
compileSequenceArray(dap4.core.dmr.DapVariable var,
D4Cursor container)
Compile a sequence array.
|
protected D4Cursor |
compileStructure(dap4.core.dmr.DapVariable var,
dap4.core.dmr.DapStructure dapstruct,
D4Cursor container)
Compile a structure instance.
|
protected D4Cursor |
compileStructureArray(dap4.core.dmr.DapVariable var,
D4Cursor container)
Compile a structure array.
|
protected D4Cursor |
compileVar(dap4.core.dmr.DapVariable dapvar,
D4Cursor container) |
protected static int |
computeTypeSize(dap4.core.dmr.DapType daptype)
Compute the size in databuffer of the serialized form
|
protected int |
extractChecksum(ByteBuffer data) |
protected static int |
getCount(ByteBuffer data) |
protected static int |
getPos(ByteBuffer data) |
protected static void |
skip(ByteBuffer data,
int count) |
protected static long |
walkByteStrings(long[] positions,
ByteBuffer databuffer) |
public static boolean DEBUG
public static final int COUNTSIZE
protected dap4.core.dmr.DapDataset dataset
protected ByteBuffer databuffer
protected dap4.core.data.ChecksumMode checksummode
protected ByteOrder order
protected D4DSP dsp
public D4DataCompiler(D4DSP dsp, dap4.core.data.ChecksumMode checksummode, ByteOrder order, ByteBuffer databuffer) throws dap4.core.util.DapException
dsp - the D4DSPchecksummode - databuffer - the source of serialized databufferdap4.core.util.DapExceptionpublic void compile()
throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected D4Cursor compileVar(dap4.core.dmr.DapVariable dapvar, D4Cursor container) throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected D4Cursor compileAtomicVar(dap4.core.dmr.DapVariable var, D4Cursor container) throws dap4.core.util.DapException
var - container - dap4.core.util.DapExceptionprotected D4Cursor compileStructureArray(dap4.core.dmr.DapVariable var, D4Cursor container) throws dap4.core.util.DapException
var - the templatecontainer - if inside a compound objectdap4.core.util.DapExceptionprotected D4Cursor compileStructure(dap4.core.dmr.DapVariable var, dap4.core.dmr.DapStructure dapstruct, D4Cursor container) throws dap4.core.util.DapException
dapstruct - The templatecontainer - dap4.core.util.DapExceptionprotected D4Cursor compileSequenceArray(dap4.core.dmr.DapVariable var, D4Cursor container) throws dap4.core.util.DapException
var - the templatedap4.core.util.DapExceptionpublic D4Cursor compileSequence(dap4.core.dmr.DapVariable var, dap4.core.dmr.DapSequence dapseq, D4Cursor container) throws dap4.core.util.DapException
dapseq - container - dap4.core.util.DapExceptionprotected int extractChecksum(ByteBuffer data) throws dap4.core.util.DapException
dap4.core.util.DapExceptionprotected static void skip(ByteBuffer data, int count)
protected static int getCount(ByteBuffer data)
protected static int getPos(ByteBuffer data)
protected static int computeTypeSize(dap4.core.dmr.DapType daptype)
daptype - protected static long walkByteStrings(long[] positions,
ByteBuffer databuffer)