opendap/src/main/java/opendap/dap/DArray.java
public DArrayDimension getDimension(int dimension) throws InvalidDimensionException {

        // QC the passed dimension
        if (dimension < dimVector.size())
            return  dimVector.get(dimension);
        else
            throw new InvalidDimensionException("DArray.getDimension(): Bad dimension request: dimension > # of dimensions");
    }
public DArrayDimension getDimension(int dimension) throws InvalidDimensionException {

        // QC the passed dimension
        if (dimension < dimVector.size())
            return  dimVector.get(dimension);
        else
            throw new InvalidDimensionException("DArray.getDimension(): Bad dimension request: dimension > # of dimensions");
    }
Returns the <code>DArrayDimension</code> object for
the dimension requested. It makes sure that the dimension requested
exists.