opendap/src/main/java/opendap/dap/UInt16PrimitiveVector.java
public void printVal(PrintWriter os, String space) {
        int len = getLength();
        for (int i = 0; i < len - 1; i++) {
            // to print properly, cast to long and convert to unsigned
            os.print(((long) getValue(i)) & 0xFFFFL);
            os.print(", ");
        }
        // print last value, if any, without trailing comma
        if (len > 0)
            os.print(((long) getValue(len - 1)) & 0xFFFFL);
    }
public void printVal(PrintWriter os, String space) {
        int len = getLength();
        for (int i = 0; i < len - 1; i++) {
            // to print properly, cast to long and convert to unsigned
            os.print(((long) getValue(i)) & 0xFFFFL);
            os.print(", ");
        }
        // print last value, if any, without trailing comma
        if (len > 0)
            os.print(((long) getValue(len - 1)) & 0xFFFFL);
    }
Prints the value of all variables in this vector.  This
method is primarily intended for debugging OPeNDAP applications and
text-based clients such as geturl.

@param os    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.
@see BaseType#printVal(PrintWriter, String, boolean)