@Override public void dispose() { delegate.dispose(); }
public void dispose() { httpResponse.dispose(); }
response.dispose();
response.dispose();
response.dispose();
public Response(HTTPResponse httpResponse) throws ServiceException, IOException { if (httpResponse.getResponseStream() == null) { throw new NullPointerException( "An inputStream is required for " + getClass().getName()); } if (httpResponse.getContentType() == null) { // should missing content type be fatal? Or could we make an assumption? // in case of exception, we have to dispose the response, as it might // be using a deflate input stream, which holds onto native resources httpResponse.getResponseStream().close(); httpResponse.dispose(); throw new NullPointerException("Content type is required for " + getClass().getName()); } this.httpResponse = httpResponse; /* * Intercept XML ServiceExceptions and throw them */ if (httpResponse.getContentType().toLowerCase().equals("application/vnd.ogc.se_xml")) { try { throw parseException(httpResponse.getResponseStream()); } finally { dispose(); } } }
httpResponse.dispose();
response.dispose();
response.dispose();
throw new IOException(e); } finally { response.dispose();
throw new IOException(e); } finally { response.dispose();
public void dispose(){ httpResponse.dispose(); }
response.dispose();
response.dispose();
response.dispose();
response.dispose();
httpResponse.dispose();
response.dispose();
throw new IOException(e); } finally { response.dispose();
throw new IOException(e); } finally { response.dispose();