BesAPI.writeDDS(rs.getDataset(), rs.getConstraintExpression(), Out);
    public void sendDDS(HttpServletRequest request,                        HttpServletResponse response,                        ReqState rs)            throws IOException, ServletException {        System.out.println("Flow in sendDDS()");        if (Debug.isSet("showResponse"))            System.out.println("doGetDDS for dataset: " + rs.getDataset());        response.setContentType("text/plain");        response.setHeader("XDODS-Server", getXDODSServerVersion());        response.setHeader("XOPeNDAP-Server", getXOPeNDAPServerVersion());        response.setHeader("XDAP", getXDAPVersion(request));        response.setHeader("Content-Description", "dods_dds");        // Commented because of a bug in the OPeNDAP C++ stuff...        //response.setHeader("Content-Encoding", "plain");        OutputStream Out = new BufferedOutputStream(response.getOutputStream());        try {            // We get a DDX from the BES and then parse it. We use the parsed            // one to send a DDS representation. Since the BES applies the            // constraint expression, we don't need to get a ServerDDS (full            // of Server BaseTypes) with which we could apply the conststraint            // expression - it's already done.            DDS ddx = BesAPI.getDDX(rs.getDataset(), rs.getConstraintExpression());            ddx.print(Out);            // Earlier method - asks BES directly for a DDS and then writes it            // out to the response stream.            // BesAPI.writeDDS(rs.getDataset(), rs.getConstraintExpression(), Out);        } catch (DODSException de) {            Util.opendapExceptionHandler(de, response);        } catch (Exception e) {            Util.anyExceptionHandler(e, response);        } finally {            Out.flush();        }        System.out.println("Flow returned to sendDDS()");        response.setStatus(HttpServletResponse.SC_OK);    }