dap4/d4cdm/src/main/java/dap4/cdm/CDMUtil.java
static public long
    extractLongValue(TypeSort atomtype, DataCursor dataset, Index index)
            throws DapException
    {
        Object result;
        result = dataset.read(index);
        long lvalue = CDMTypeFcns.extract(atomtype, result);
        return lvalue;
    }
static public long
    extractLongValue(TypeSort atomtype, DataCursor dataset, Index index)
            throws DapException
    {
        Object result;
        result = dataset.read(index);
        long lvalue = CDMTypeFcns.extract(atomtype, result);
        return lvalue;
    }
Extract, as a long, value from a (presumably)
atomic typed array of values; dataset position
is presumed correct.

@param atomtype type of object to extract
@param dataset  Data containing the objects
@param index    Which element of dataset to read
@return resulting value as a long
@throws ForbiddenConversionException if cannot convert to long