opendap/src/main/java/opendap/dap/DConnect2.java
public DAS getDAS() throws IOException, DAP2Exception
    {
        DASCommand command = new DASCommand();
        if(filePath != null) { // url was file:
            File daspath = new File(filePath + ".das");
            // See if the das file exists
            if(daspath.canRead()) {
                try (FileInputStream is = new FileInputStream(daspath)) {
                    command.process(is);
                }
            }
        } else if(stream != null) {
            command.process(stream);
        } else { // assume url is remote
            try {
                openConnection(urlString + ".das" + getCompleteCE(projString,selString), command);
            } catch (DAP2Exception de) {
                //if(de.getErrorCode() != DAP2Exception.NO_SUCH_FILE)
                //throw de;  // rethrow
            }
        }
        return command.das;
    }
public DAS getDAS() throws IOException, DAP2Exception
    {
        DASCommand command = new DASCommand();
        if(filePath != null) { // url was file:
            File daspath = new File(filePath + ".das");
            // See if the das file exists
            if(daspath.canRead()) {
                try (FileInputStream is = new FileInputStream(daspath)) {
                    command.process(is);
                }
            }
        } else if(stream != null) {
            command.process(stream);
        } else { // assume url is remote
            try {
                openConnection(urlString + ".das" + getCompleteCE(projString,selString), command);
            } catch (DAP2Exception de) {
                //if(de.getErrorCode() != DAP2Exception.NO_SUCH_FILE)
                //throw de;  // rethrow
            }
        }
        return command.das;
    }
Returns the DAS object from the dataset referenced by this object's URL.
The DAS object is referred to by appending `.das' to the end of a DODS
URL.

@return the DAS associated with the referenced dataset.
@throws MalformedURLException if the URL given to the
constructor has an error
@throws IOException           if an error connecting to the remote server
@throws DASException          on an error constructing the DAS
@throws DAP2Exception         if an error returned by the remote server