public enum Base64 extends Enum<Base64>
限定符和类型 | 方法和说明 |
---|---|
static byte[] |
decode(byte[] b64)
Decodes the given base 64 encoded bytes.
|
static byte[] |
decode(String b64)
Decodes the given base 64 encoded string, skipping carriage returns, line feeds and spaces as
needed.
|
static byte[] |
encode(byte[] bytes)
Returns a 64 encoded byte array of the given bytes.
|
static String |
encodeAsString(byte[] bytes)
Returns a base 64 encoded string of the given bytes.
|
static Base64 |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Base64[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static Base64[] values()
for (Base64 c : Base64.values()) System.out.println(c);
public static Base64 valueOf(String name)
name
- 要返回的枚举常量的名称。IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值public static String encodeAsString(byte[] bytes)
public static byte[] encode(byte[] bytes)
public static byte[] decode(String b64)
public static byte[] decode(byte[] b64)
Copyright © 2017. All rights reserved.