dap4/d4lib/src/main/java/dap4/dap4lib/HttpDSP.java
public String
    getCapabilities(String url)
            throws IOException
    {
        // Save the original url
        String saveurl = this.xuri.getOriginal();
        parseURL(url);
        String fdsurl = buildURL(this.xuri.assemble(XURI.URLALL), DSRSUFFIX, null, null);
        try {
            // Make the request and return an input stream for accessing the databuffer
            // Should fill in context bigendian and stream fields
            InputStream stream = callServer(fdsurl);
            // read the result, convert to string and return.
            byte[] bytes = DapUtil.readbinaryfile(stream);
            String document = new String(bytes, DapUtil.UTF8);
            return document;
        } finally {
            parseURL(saveurl);
        }
    }
public String
    getCapabilities(String url)
            throws IOException
    {
        // Save the original url
        String saveurl = this.xuri.getOriginal();
        parseURL(url);
        String fdsurl = buildURL(this.xuri.assemble(XURI.URLALL), DSRSUFFIX, null, null);
        try {
            // Make the request and return an input stream for accessing the databuffer
            // Should fill in context bigendian and stream fields
            InputStream stream = callServer(fdsurl);
            // read the result, convert to string and return.
            byte[] bytes = DapUtil.readbinaryfile(stream);
            String document = new String(bytes, DapUtil.UTF8);
            return document;
        } finally {
            parseURL(saveurl);
        }
    }
public String getCapabilities ( String url ) throws IOException { // Save the original url String saveurl = this . xuri . getOriginal ( ) ; parseURL ( url ) ; String fdsurl = buildURL ( this . xuri . assemble ( XURI . URLALL ) , DSRSUFFIX , null , null ) ; try { // Make the request and return an input stream for accessing the databuffer // Should fill in context bigendian and stream fields InputStream stream = callServer ( fdsurl ) ; // read the result, convert to string and return. byte [ ] bytes = DapUtil . readbinaryfile ( stream ) ; String document = new String ( bytes , DapUtil . UTF8 ) ; return document ; } finally { parseURL ( saveurl ) ; } }
Provide a method for getting the capabilities document.

@param url for accessing the document
@throws DapException
Provide a method for getting the capabilities document .