develop branch merge
This commit is contained in:
parent
da38a89d49
commit
a11fe4db44
|
@ -120,6 +120,7 @@ dependencies {
|
|||
compile 'com.google.code.findbugs:jsr305:3.0.0'
|
||||
compile 'com.fasterxml.jackson.core:jackson-databind:2.2.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 'javax.persistence:persistence-api:1.0.2'
|
||||
|
|
|
@ -15,7 +15,8 @@ import static java.lang.System.getProperty;
|
|||
//import static java.util.Base64.getDecoder;
|
||||
//import static java.util.Base64.getEncoder;
|
||||
//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 {
|
||||
|
||||
|
@ -120,7 +121,7 @@ public final class VMUtils {
|
|||
|
||||
public static String zipAndEncode(String content) {
|
||||
try {
|
||||
return encodeToString(compress(content), DEFAULT);//getEncoder().encodeToString(compress(content));
|
||||
return encodeBase64String(compress(content));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Cannot zip or encode: ", e);
|
||||
return content;
|
||||
|
@ -129,7 +130,7 @@ public final class VMUtils {
|
|||
|
||||
public static String unzipAndDecode(String content) {
|
||||
try {
|
||||
return decompress(decode(content, DEFAULT));//decompress(getDecoder().decode(content));
|
||||
return decompress(decodeBase64(content));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Cannot unzip or decode: ", e);
|
||||
return content;
|
||||
|
|
Loading…
Reference in New Issue