dap4/d4lib/src/main/java/dap4/dap4lib/serial/D4Cursor.java
protected Object
    readAs(DapVariable atomvar, DapType basetype, List<Slice> slices)
            throws DapException
    {
        if(basetype.getTypeSort() == TypeSort.Enum) {// short circuit this case
            basetype = ((DapEnumeration) basetype).getBaseType();
            return readAs(atomvar, basetype, slices);
        }
        long count = DapUtil.sliceProduct(slices);
        Object result = LibTypeFcns.newVector(basetype, count);
        Odometer odom = Odometer.factory(slices);
        if(DapUtil.isContiguous(slices) && basetype.isFixedSize())
            readContig(slices, basetype, count, odom, result);
        else
            readOdom(slices, basetype, odom, result);
        return result;
    }
protected Object
    readAs(DapVariable atomvar, DapType basetype, List<Slice> slices)
            throws DapException
    {
        if(basetype.getTypeSort() == TypeSort.Enum) {// short circuit this case
            basetype = ((DapEnumeration) basetype).getBaseType();
            return readAs(atomvar, basetype, slices);
        }
        long count = DapUtil.sliceProduct(slices);
        Object result = LibTypeFcns.newVector(basetype, count);
        Odometer odom = Odometer.factory(slices);
        if(DapUtil.isContiguous(slices) && basetype.isFixedSize())
            readContig(slices, basetype, count, odom, result);
        else
            readOdom(slices, basetype, odom, result);
        return result;
    }
protected Object readAs ( DapVariable atomvar , DapType basetype , List < Slice > slices ) throws DapException { if ( basetype . getTypeSort ( ) == TypeSort . Enum ) { // short circuit this case basetype = ( ( DapEnumeration ) basetype ) . getBaseType ( ) ; return readAs ( atomvar , basetype , slices ) ; } long count = DapUtil . sliceProduct ( slices ) ; Object result = LibTypeFcns . newVector ( basetype , count ) ; Odometer odom = Odometer . factory ( slices ) ; if ( DapUtil . isContiguous ( slices ) && basetype . isFixedSize ( ) ) readContig ( slices , basetype , count , odom , result ) ; else readOdom ( slices , basetype , odom , result ) ; return result ; }
Allow specification of basetype to use; used for enumerations

@param atomvar
@param basetype
@param slices
@return
@throws DapException
Allow specification of basetype to use ; used for enumerations