From 31f1684464cb9f4f342bc7512597ac54b4392331 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Sat, 12 Sep 2009 13:48:02 +0000 Subject: [PATCH] Added byte[] getter for the response content. git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@888 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../java/org/eclipse/jetty/client/ContentExchange.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/ContentExchange.java b/jetty-client/src/main/java/org/eclipse/jetty/client/ContentExchange.java index 7a8c2554372..86557c6feae 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/ContentExchange.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/ContentExchange.java @@ -48,9 +48,14 @@ public class ContentExchange extends CachedExchange public String getResponseContent() throws UnsupportedEncodingException { if (_responseContent != null) - { return _responseContent.toString(_encoding); - } + return null; + } + + public byte[] getResponseContentBytes() + { + if (_responseContent != null) + return _responseContent.toByteArray(); return null; }