comparison src/main/java/de/intevation/artifacts/httpclient/http/response/DocumentResponseHandler.java @ 0:a1db30b33f43

Moved the experimental branch 'work-on-gwt' of the console-client to an own module 'http-client' and removed the console-client. http-client/trunk@1323 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 17 Feb 2011 10:31:40 +0000
parents
children f314a514de5f
comparison
equal deleted inserted replaced
-1:000000000000 0:a1db30b33f43
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 public Object handle(Response response) throws IOException {
27 Representation output = response.getEntity();
28 return XMLUtils.readDocument(output.getStream());
29 }
30 }
31 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org