From da8bb92e3e43803598ae88099ee2fab9029466d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Chicchiricc=C3=B2?= <--global> Date: Fri, 25 Jul 2014 12:04:53 +0200 Subject: [PATCH] Use commons codec's Base64 in an Android-friendly way --- .../main/java/org/apache/olingo/ext/proxy/AbstractService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java index 7519e4785..d6124bd04 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java @@ -69,7 +69,8 @@ public abstract class AbstractService> ObjectInputStream ois = null; XMLMetadata metadata = null; try { - bais = new ByteArrayInputStream(Base64.decodeBase64(compressedMetadata)); + // use commons codec's Base64 in this fashion to stay compatible with Android + bais = new ByteArrayInputStream(new Base64().decode(compressedMetadata.getBytes("UTF-8"))); gzis = new GZIPInputStream(bais); ois = new ObjectInputStream(gzis); metadata = (XMLMetadata) ois.readObject();