BesAPI.getDODS(rs.getDataset(), rs.getConstraintExpression(), bOut);
BesAPI.writeDapData(rs.getDataset(), rs.getConstraintExpression(), bOut);
    public void sendDODS(HttpServletRequest request,                         HttpServletResponse response,                         ReqState rs)            throws IOException, ServletException {        if (Debug.isSet("showResponse"))            System.out.println("doGetOPeNDAP For: " + rs.getDataset());        response.setContentType("application/octet-stream");        response.setHeader("XDODS-Server", getXDODSServerVersion());        response.setHeader("XOPeNDAP-Server", getXOPeNDAPServerVersion());        response.setHeader("XDAP", getXDAPVersion(request));        response.setHeader("Content-Description", "dods_data");        ServletOutputStream sOut = response.getOutputStream();        OutputStream bOut;        System.out.println("Flow in doGetOPeNDAP()");        if (rs.getAcceptsCompressed()) {            response.setHeader("Content-Encoding", "deflate");            bOut = new DeflaterOutputStream(sOut);        } else {            // Commented out because of a bug in the OPeNDAP C++ stuff...            //response.setHeader("Content-Encoding", "plain");            bOut = new BufferedOutputStream(sOut);        }        try {            BesAPI.getDODS(rs.getDataset(), rs.getConstraintExpression(), bOut);        } catch (DODSException de) {            Util.opendapExceptionHandler(de, response);        } catch (PPTException e) {            DODSException de = new DODSException(e.getMessage() + e.getStackTrace());            Util.opendapExceptionHandler(de, response);        } finally {            bOut.flush();        }        response.setStatus(HttpServletResponse.SC_OK);    }