Mercurial > dive4elements > http-client
view src/main/java/org/dive4elements/artifacts/httpclient/http/response/DocumentResponseHandler.java @ 119:5aad20399cbd
Fixed missing import
author | mschaefer |
---|---|
date | Wed, 13 Jun 2018 19:09:41 +0200 |
parents | c92b50c9c99a |
children |
line wrap: on
line source
/* * Copyright (c) 2010 by Intevation GmbH * * This program is free software under the LGPL (>=v2.1) * Read the file LGPL.txt coming with the software for details * or visit http://www.gnu.org/licenses/ if it does not exist. */ package org.dive4elements.artifacts.httpclient.http.response; import java.io.IOException; import org.dive4elements.artifacts.httpclient.utils.XMLUtils; import org.restlet.Response; import org.restlet.representation.Representation; /** * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class DocumentResponseHandler implements ResponseHandler { @Override public Object handle(final Response response) throws IOException { final Representation output = response.getEntity(); // FIXME: stream not closed? return XMLUtils.readDocument(output.getStream()); } }