/** * * @throws IOException */ public void close() throws IOException { response.close(); } }
/** * * @throws IOException */ public void close() throws IOException { rawResponse.close(); }
/** * * @throws IOException */ public void close() throws IOException { rawResponse.close(); }
protected void closeQuietly( OwsHttpResponse response ) { if (response != null) { response.close(); } } }
public void close() throws IOException { response.close(); }
public void close() throws IOException { response.close(); }
/** * Returns the tile as an image. * * @return image, never <code>null</code> * @throws IOException * @throws XMLStreamException * @throws OWSExceptionReport */ public BufferedImage getAsImage() throws IOException, OWSExceptionReport, XMLStreamException { rawResponse.assertNoXmlContentTypeAndExceptionReport(); BufferedImage image = null; try { InputStream is = rawResponse.getAsBinaryStream(); image = HttpUtils.IMAGE.work( is ); } finally { rawResponse.close(); } return image; }
tmpStore = XMLStreamUtils.serialize( xmlStream ); } finally { response.close();
private void initCapabilities( URL capaUrl ) throws IOException, OWSExceptionReport, XMLStreamException { if ( shouldUseGet( capaUrl ) ) { OwsHttpResponse response = httpClient.doGet( capaUrl, null, null ); response.assertHttpStatus200(); XMLStreamReader responseAsXMLStream = response.getAsXMLStream(); try { XMLAdapter xmlAdapter = new XMLAdapter( responseAsXMLStream ); initCapabilities( xmlAdapter ); } finally { responseAsXMLStream.close(); response.close(); } } else { XMLAdapter xmlAdapter = new XMLAdapter( capaUrl ); initCapabilities( xmlAdapter ); } }