Package dap4.dap4lib.serial
Class D4Cursor
- java.lang.Object
-
- dap4.dap4lib.AbstractCursor
-
- dap4.dap4lib.serial.D4Cursor
-
- All Implemented Interfaces:
dap4.core.data.DataCursor
public class D4Cursor extends AbstractCursor
-
-
Field Summary
Fields Modifier and Type Field Description protected long[]bytestringsprotected D4Cursor[]elementsprotected D4Cursor[]fieldcursorsprotected longoffsetprotected List<D4Cursor>records-
Fields inherited from class dap4.dap4lib.AbstractCursor
arrayindex, container, dsp, recordcount, recordindex, scheme, template
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description D4CursoraddField(int m, D4Cursor field)D4CursoraddRecord(D4Cursor rec)longgetElementSize(dap4.core.dmr.DapVariable v)static longgetLength(ByteBuffer b)longgetRecordCount()Objectread(dap4.core.util.Index index)Objectread(List<dap4.core.util.Slice> slices)protected ObjectreadAs(dap4.core.dmr.DapVariable atomvar, dap4.core.dmr.DapType basetype, List<dap4.core.util.Slice> slices)Allow specification of basetype to use; used for enumerationsprotected ObjectreadAtomic(List<dap4.core.util.Slice> slices)protected voidreadContig(List<dap4.core.util.Slice> slices, dap4.core.dmr.DapType basetype, long count, dap4.core.util.Odometer odom, Object result)D4CursorreadField(int findex)protected ObjectreadOdom(List<dap4.core.util.Slice> slices, dap4.core.dmr.DapType basetype, dap4.core.util.Odometer odom, Object result)D4CursorreadRecord(long i)D4CursorreadSequence(dap4.core.util.Index index)protected D4CursorreadStructure(dap4.core.util.Index index)D4CursorsetByteStringOffsets(long total, long[] positions)D4CursorsetElements(D4Cursor[] instances)D4CursorsetOffset(long pos)-
Methods inherited from class dap4.dap4lib.AbstractCursor
fieldIndex, getContainer, getDSP, getIndex, getRecordIndex, getScheme, getTemplate, isAtomic, isCompound, isCompoundArray, isField, isScalar, schemeFor, setContainer, setDSP, setIndex, setRecordCount, setRecordIndex, setScheme, setTemplate, toString
-
-
-
-
Method Detail
-
read
public Object read(dap4.core.util.Index index) throws dap4.core.util.DapException
- Specified by:
readin interfacedap4.core.data.DataCursor- Specified by:
readin classAbstractCursor- Throws:
dap4.core.util.DapException
-
read
public Object read(List<dap4.core.util.Slice> slices) throws dap4.core.util.DapException
- Specified by:
readin interfacedap4.core.data.DataCursor- Specified by:
readin classAbstractCursor- Throws:
dap4.core.util.DapException
-
readField
public D4Cursor readField(int findex) throws dap4.core.util.DapException
- Specified by:
readFieldin interfacedap4.core.data.DataCursor- Specified by:
readFieldin classAbstractCursor- Throws:
dap4.core.util.DapException
-
readRecord
public D4Cursor readRecord(long i)
- Specified by:
readRecordin interfacedap4.core.data.DataCursor- Specified by:
readRecordin classAbstractCursor
-
getRecordCount
public long getRecordCount()
- Specified by:
getRecordCountin interfacedap4.core.data.DataCursor- Overrides:
getRecordCountin classAbstractCursor
-
readAtomic
protected Object readAtomic(List<dap4.core.util.Slice> slices) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readAs
protected Object readAs(dap4.core.dmr.DapVariable atomvar, dap4.core.dmr.DapType basetype, List<dap4.core.util.Slice> slices) throws dap4.core.util.DapException
Allow specification of basetype to use; used for enumerations- Parameters:
atomvar-basetype-slices-- Returns:
- Object of basetype
- Throws:
dap4.core.util.DapException
-
readContig
protected void readContig(List<dap4.core.util.Slice> slices, dap4.core.dmr.DapType basetype, long count, dap4.core.util.Odometer odom, Object result) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readOdom
protected Object readOdom(List<dap4.core.util.Slice> slices, dap4.core.dmr.DapType basetype, dap4.core.util.Odometer odom, Object result) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readStructure
protected D4Cursor readStructure(dap4.core.util.Index index) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
readSequence
public D4Cursor readSequence(dap4.core.util.Index index) throws dap4.core.util.DapException
- Throws:
dap4.core.util.DapException
-
setOffset
public D4Cursor setOffset(long pos)
-
setByteStringOffsets
public D4Cursor setByteStringOffsets(long total, long[] positions)
-
getElementSize
public long getElementSize(dap4.core.dmr.DapVariable v)
-
getLength
public static long getLength(ByteBuffer b)
-
-