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 .