opendap/src/main/java/opendap/servers/SDGrid.java
public void serialize(String dataset, DataOutputStream sink, CEEvaluator ce, Object specialO)
            throws NoSuchVariableException, DAP2ServerSideException, IOException {

        if (!isRead())
            read(dataset, specialO);

        if (ce.evalClauses(specialO)) {
            if (((ServerMethods) arrayVar).isProject())
                ((ServerMethods) arrayVar).serialize(dataset, sink, ce, specialO);

            for (Enumeration e = mapVars.elements(); e.hasMoreElements();) {
                ServerMethods sm = (ServerMethods) e.nextElement();
                if (sm.isProject())
                    sm.serialize(dataset, sink, ce, specialO);
            }
        }
    }
public void serialize(String dataset, DataOutputStream sink, CEEvaluator ce, Object specialO)
            throws NoSuchVariableException, DAP2ServerSideException, IOException {

        if (!isRead())
            read(dataset, specialO);

        if (ce.evalClauses(specialO)) {
            if (((ServerMethods) arrayVar).isProject())
                ((ServerMethods) arrayVar).serialize(dataset, sink, ce, specialO);

            for (Enumeration e = mapVars.elements(); e.hasMoreElements();) {
                ServerMethods sm = (ServerMethods) e.nextElement();
                if (sm.isProject())
                    sm.serialize(dataset, sink, ce, specialO);
            }
        }
    }
Server-side serialization for OPeNDAP variables (sub-classes of
<code>BaseType</code>).
This does not send the entire class as the Java <code>Serializable</code>
interface does, rather it sends only the binary data values. Other software
is responsible for sending variable type information (see <code>DDS</code>).
<p/>
Writes data to a <code>DataOutputStream</code>. This method is used
on the server side of the OPeNDAP client/server connection, and possibly
by GUI clients which need to download OPeNDAP data, manipulate it, and
then re-save it as a binary file.

@param sink a <code>DataOutputStream</code> to write to.
@throws IOException thrown on any <code>OutputStream</code> exception.
@see BaseType
@see DDS
@see ServerDDS