opendap/src/main/java/opendap/dap/DAP2Exception.java
public final boolean parse(InputStream stream)
    {
        Dap2Parser parser = new Dap2Parser(new DefaultFactory());
        String text;
        try {
            text = DConnect2.captureStream(stream);
            if(parser.errparse(text, this) != Dap2Parser.DapERR) return false;
        } catch (ParseException pe) {
            this.initCause(pe);
        } catch (IOException pe) {
            this.initCause(pe);
        }
        return true;
    }
public final boolean parse(InputStream stream)
    {
        Dap2Parser parser = new Dap2Parser(new DefaultFactory());
        String text;
        try {
            text = DConnect2.captureStream(stream);
            if(parser.errparse(text, this) != Dap2Parser.DapERR) return false;
        } catch (ParseException pe) {
            this.initCause(pe);
        } catch (IOException pe) {
            this.initCause(pe);
        }
        return true;
    }
Reads an Error description from the named InputStream.  This
method calls a generated parser to interpret an ASCII representation of an
<code>Error</code>, and regenerate it as a <code>DAP2Exception</code>.

@param stream the text containing the <code>Error</code> to parse.