public class D4DataCompiler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ChecksumMode |
checksummode |
static int |
COUNTSIZE |
protected java.nio.ByteBuffer |
databuffer |
protected DapDataset |
dataset |
static boolean |
DEBUG |
protected D4DSP |
dsp |
protected java.nio.ByteOrder |
order |
Constructor and Description |
---|
D4DataCompiler(D4DSP dsp,
ChecksumMode checksummode,
java.nio.ByteOrder order,
java.nio.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(DapVariable var,
D4Cursor container) |
D4Cursor |
compileSequence(DapVariable var,
DapSequence dapseq,
D4Cursor container)
Compile a sequence as a set of records.
|
protected D4Cursor |
compileSequenceArray(DapVariable var,
D4Cursor container)
Compile a sequence array.
|
protected D4Cursor |
compileStructure(DapVariable var,
DapStructure dapstruct,
D4Cursor container)
Compile a structure instance.
|
protected D4Cursor |
compileStructureArray(DapVariable var,
D4Cursor container)
Compile a structure array.
|
protected D4Cursor |
compileVar(DapVariable dapvar,
D4Cursor container) |
protected static int |
computeTypeSize(DapType daptype)
Compute the size in databuffer of the serialized form
|
protected int |
extractChecksum(java.nio.ByteBuffer data) |
protected static int |
getCount(java.nio.ByteBuffer data) |
protected static int |
getPos(java.nio.ByteBuffer data) |
protected static void |
skip(java.nio.ByteBuffer data,
int count) |
protected static long |
walkByteStrings(long[] positions,
java.nio.ByteBuffer databuffer) |
public static boolean DEBUG
public static final int COUNTSIZE
protected DapDataset dataset
protected java.nio.ByteBuffer databuffer
protected ChecksumMode checksummode
protected java.nio.ByteOrder order
protected D4DSP dsp
public D4DataCompiler(D4DSP dsp, ChecksumMode checksummode, java.nio.ByteOrder order, java.nio.ByteBuffer databuffer) throws DapException
dsp
- the D4DSPchecksummode
- databuffer
- the source of serialized databufferDapException
public void compile() throws DapException
DapException
protected D4Cursor compileVar(DapVariable dapvar, D4Cursor container) throws DapException
DapException
protected D4Cursor compileAtomicVar(DapVariable var, D4Cursor container) throws DapException
var
- container
- DapException
protected D4Cursor compileStructureArray(DapVariable var, D4Cursor container) throws DapException
var
- the templatecontainer
- if inside a compound objectDapException
protected D4Cursor compileStructure(DapVariable var, DapStructure dapstruct, D4Cursor container) throws DapException
dapstruct
- The templatecontainer
- DapException
protected D4Cursor compileSequenceArray(DapVariable var, D4Cursor container) throws DapException
var
- the templateDapException
public D4Cursor compileSequence(DapVariable var, DapSequence dapseq, D4Cursor container) throws DapException
dapseq
- container
- DapException
protected int extractChecksum(java.nio.ByteBuffer data) throws DapException
DapException
protected static void skip(java.nio.ByteBuffer data, int count)
protected static int getCount(java.nio.ByteBuffer data)
protected static int getPos(java.nio.ByteBuffer data)
protected static int computeTypeSize(DapType daptype)
daptype
- protected static long walkByteStrings(long[] positions, java.nio.ByteBuffer databuffer)