opendap/src/main/java/opendap/dap/DArray.java
public  void printVal(PrintWriter pw, String space, boolean print_decl_p) {
        // print the declaration if print decl is true.
        // for each dimension,
        //   for each element,
        //     print the array given its shape, number of dimensions.
        // Add the `;'

        if (print_decl_p) {
            printDecl(pw, space, false);
            pw.print(" = ");
        }

        int dims = numDimensions();
        int shape[] = new int[dims];
        int i = 0;
        for (Enumeration e = dimVector.elements(); e.hasMoreElements();) {
            DArrayDimension d = (DArrayDimension) e.nextElement();
            shape[i++] = d.getSize();
        }

        printArray(pw, 0, dims, shape, 0);

        if (print_decl_p)
            pw.println(";");

        pw.flush();
    }
public  void printVal(PrintWriter pw, String space, boolean print_decl_p) {
        // print the declaration if print decl is true.
        // for each dimension,
        //   for each element,
        //     print the array given its shape, number of dimensions.
        // Add the `;'

        if (print_decl_p) {
            printDecl(pw, space, false);
            pw.print(" = ");
        }

        int dims = numDimensions();
        int shape[] = new int[dims];
        int i = 0;
        for (Enumeration e = dimVector.elements(); e.hasMoreElements();) {
            DArrayDimension d = (DArrayDimension) e.nextElement();
            shape[i++] = d.getSize();
        }

        printArray(pw, 0, dims, shape, 0);

        if (print_decl_p)
            pw.println(";");

        pw.flush();
    }
Prints the value of the variable, with its declaration.  This
function is primarily intended for debugging OPeNDAP applications and
text-based clients such as geturl.

@param pw           the <code>PrintWriter</code> on which to print the value.
@param space        this value is passed to the <code>printDecl</code> method,
and controls the leading spaces of the output.
@param print_decl_p a boolean value controlling whether the
variable declaration is printed as well as the value.
@see BaseType#printVal(PrintWriter, String, boolean)