dap4/d4cdm/src/main/java/dap4/cdm/CDMUtil.java
static public Object
    convertVector(DapType dsttype, DapType srctype, Object src)
    {
        int i;

        TypeSort srcatomtype = srctype.getAtomicType();
        TypeSort dstatomtype = dsttype.getAtomicType();

        if(srcatomtype == dstatomtype) {
            return src;
        }
        if(srcatomtype.isIntegerType()
                && TypeSort.getSignedVersion(srcatomtype) == TypeSort.getSignedVersion(dstatomtype))
            return src;

        Object result = CDMTypeFcns.convert(dstatomtype, srcatomtype, src);
        if(result == null)
            throw new ForbiddenConversionException();
        return result;
    }
static public Object
    convertVector(DapType dsttype, DapType srctype, Object src)
    {
        int i;

        TypeSort srcatomtype = srctype.getAtomicType();
        TypeSort dstatomtype = dsttype.getAtomicType();

        if(srcatomtype == dstatomtype) {
            return src;
        }
        if(srcatomtype.isIntegerType()
                && TypeSort.getSignedVersion(srcatomtype) == TypeSort.getSignedVersion(dstatomtype))
            return src;

        Object result = CDMTypeFcns.convert(dstatomtype, srcatomtype, src);
        if(result == null)
            throw new ForbiddenConversionException();
        return result;
    }
static public Object convertVector ( DapType dsttype , DapType srctype , Object src ) { int i ; TypeSort srcatomtype = srctype . getAtomicType ( ) ; TypeSort dstatomtype = dsttype . getAtomicType ( ) ; if ( srcatomtype == dstatomtype ) { return src ; } if ( srcatomtype . isIntegerType ( ) && TypeSort . getSignedVersion ( srcatomtype ) == TypeSort . getSignedVersion ( dstatomtype ) ) return src ; Object result = CDMTypeFcns . convert ( dstatomtype , srcatomtype , src ) ; if ( result == null ) throw new ForbiddenConversionException ( ) ; return result ; }
Convert an array of one type of values to another type

@param dsttype target type
@param srctype source type
@param src     array of values to convert
@return resulting array of converted values as an object
Convert an array of one type of values to another type