mirror of
https://github.com/apache/olingo-odata4.git
synced 2025-02-06 18:18:55 +00:00
Use commons codec's Base64 in an Android-friendly way
This commit is contained in:
parent
6d51eef303
commit
da8bb92e3e
@ -69,7 +69,8 @@ public abstract class AbstractService<C extends CommonEdmEnabledODataClient<?>>
|
|||||||
ObjectInputStream ois = null;
|
ObjectInputStream ois = null;
|
||||||
XMLMetadata metadata = null;
|
XMLMetadata metadata = null;
|
||||||
try {
|
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);
|
gzis = new GZIPInputStream(bais);
|
||||||
ois = new ObjectInputStream(gzis);
|
ois = new ObjectInputStream(gzis);
|
||||||
metadata = (XMLMetadata) ois.readObject();
|
metadata = (XMLMetadata) ois.readObject();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user