Merge branch 'android-test-poc9-rlpx' of https://opulence.git.beanstalkapp.com/ethereumj into android-test-poc9-rlpx

This commit is contained in:
Yaroslav Dmytrotsa 2015-05-28 19:17:42 +03:00
commit 0338d45a4f
2 changed files with 5 additions and 3 deletions

View File

@ -120,6 +120,7 @@ dependencies {
compile 'com.google.code.findbugs:jsr305:3.0.0' compile 'com.google.code.findbugs:jsr305:3.0.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.2.0' compile 'com.fasterxml.jackson.core:jackson-databind:2.2.0'
compile 'org.apache.commons:commons-collections4:4.0' compile 'org.apache.commons:commons-collections4:4.0'
compile "commons-codec:commons-codec:1.10"
compile 'org.hsqldb:hsqldb:1.8.0.10' // best performance - do not upgrade! compile 'org.hsqldb:hsqldb:1.8.0.10' // best performance - do not upgrade!
compile 'javax.persistence:persistence-api:1.0.2' compile 'javax.persistence:persistence-api:1.0.2'

View File

@ -15,7 +15,8 @@ import static java.lang.System.getProperty;
//import static java.util.Base64.getDecoder; //import static java.util.Base64.getDecoder;
//import static java.util.Base64.getEncoder; //import static java.util.Base64.getEncoder;
//import static org.springframework.util.StringUtils.isEmpty; //import static org.springframework.util.StringUtils.isEmpty;
import static android.util.Base64.*; import static org.apache.commons.codec.binary.Base64.decodeBase64;
import static org.apache.commons.codec.binary.Base64.encodeBase64String;
public final class VMUtils { public final class VMUtils {
@ -120,7 +121,7 @@ public final class VMUtils {
public static String zipAndEncode(String content) { public static String zipAndEncode(String content) {
try { try {
return encodeToString(compress(content), DEFAULT);//getEncoder().encodeToString(compress(content)); return encodeBase64String(compress(content));
} catch (Exception e) { } catch (Exception e) {
LOGGER.error("Cannot zip or encode: ", e); LOGGER.error("Cannot zip or encode: ", e);
return content; return content;
@ -129,7 +130,7 @@ public final class VMUtils {
public static String unzipAndDecode(String content) { public static String unzipAndDecode(String content) {
try { try {
return decompress(decode(content, DEFAULT));//decompress(getDecoder().decode(content)); return decompress(decodeBase64(content));
} catch (Exception e) { } catch (Exception e) {
LOGGER.error("Cannot unzip or decode: ", e); LOGGER.error("Cannot unzip or decode: ", e);
return content; return content;