Example usage for android.util Base64 DEFAULT

List of usage examples for android.util Base64 DEFAULT

Introduction

In this page you can find the example usage for android.util Base64 DEFAULT.

Prototype

int DEFAULT

To view the source code for android.util Base64 DEFAULT.

Click Source Link

Document

Default values for encoder/decoder flags.

Usage

From source file:Main.java

public static String stringToBase64(String data) {
    return Base64.encodeToString(data.getBytes(), Base64.DEFAULT);
}

From source file:Main.java

public static String decode(String content) {
    return new String(Base64.decode(content.getBytes(), Base64.DEFAULT));
}

From source file:Main.java

public static String deToStr(String str) {
    String deStr = new String(Base64.decode(str.getBytes(), Base64.DEFAULT));
    return deStr;
}

From source file:Main.java

public static String encode(byte[] bytes) throws Exception {
    return new String(Base64.encode(bytes, Base64.DEFAULT));
}

From source file:Main.java

public static byte[] decode(String base64) throws Exception {
    return Base64.decode(base64.getBytes(), Base64.DEFAULT);
}

From source file:Main.java

public static String encode(String encodeStr) {
    return Base64.encodeToString(encodeStr.getBytes(), Base64.DEFAULT);
}

From source file:Main.java

public static byte[] base64EncodeByte(final String data) {
    return Base64.encode(data.getBytes(), Base64.DEFAULT);
}

From source file:Main.java

private static final String decodeBase64String(String string) {
    return new String(Base64.decode(string, Base64.DEFAULT));
}

From source file:Main.java

public static String decipher(String base64Str) {
    return new String(Base64.decode(base64Str.getBytes(), Base64.DEFAULT));
}

From source file:Main.java

public static String getFromBase64(String str) {
    String enToStr = Base64.encodeToString(str.getBytes(), Base64.DEFAULT);
    return enToStr;
}