comparison src/main/java/org/dive4elements/artifacts/httpclient/http/response/DocumentResponseHandler.java @ 71:a857866d162f

Moved directories to org.dive4elements
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 11:14:14 +0200
parents src/main/java/de/intevation/artifacts/httpclient/http/response/DocumentResponseHandler.java@f314a514de5f
children 133281653904
comparison
equal deleted inserted replaced
70:da691e917f98 71:a857866d162f
1 /*
2 * Copyright (c) 2010 by Intevation GmbH
3 *
4 * This program is free software under the LGPL (>=v2.1)
5 * Read the file LGPL.txt coming with the software for details
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
7 */
8 package de.intevation.artifacts.httpclient.http.response;
9
10 import java.io.IOException;
11
12 import org.restlet.Response;
13 import org.restlet.representation.Representation;
14
15 import de.intevation.artifacts.httpclient.utils.XMLUtils;
16
17
18 /**
19 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
20 */
21 public class DocumentResponseHandler implements ResponseHandler {
22
23 public DocumentResponseHandler() {
24 }
25
26 @Override
27 public Object handle(Response response) throws IOException {
28 Representation output = response.getEntity();
29 return XMLUtils.readDocument(output.getStream());
30 }
31 }
32 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org