public class Base64 extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
Base64.Base64Input
BASE64输入(字节流、字串流...)
|
static class |
Base64.WrapBytes |
static class |
Base64.WrapInputStream |
static class |
Base64.WrapString |
| 构造器和说明 |
|---|
Base64() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Bytes |
decode(Base64.Base64Input base64)
BASE64解码
|
static byte[] |
decode(byte[] base64)
由字节数组解码
|
static byte[] |
decode(byte[] base64,
int offset,
int len)
由字节数组解码
|
static byte[] |
decode(InputStream base64)
由字节输入流解码
|
static byte[] |
decode(String base64)
BASE64解码
|
static Appendable |
encode(Appendable appender,
byte[] bytes,
int offset,
int len)
BASE64编码
|
static String |
encode(byte[] bytes)
BASE64编码
|
static String |
encode(byte[] bytes,
int offset,
int len)
BASE64编码
|
public static String encode(byte[] bytes)
bytes - 要编码的数据(字节数组)public static String encode(byte[] bytes, int offset, int len)
bytes - 要编码的数据(字节数组)offset - 开始位置len - 长度public static Appendable encode(Appendable appender, byte[] bytes, int offset, int len) throws IOException
appender - 编码结果输出bytes - 要编码的数据(字节数组)offset - 开始位置len - 长度IOException - IO异常是抛出public static byte[] decode(byte[] base64)
throws IOException
base64 - 字节数组的BASE64编码串IOException - IO异常时抛出public static byte[] decode(byte[] base64,
int offset,
int len)
throws IOException
base64 - 字节数组的BASE64编码串offset - 开始位置len - 长度IOException - IO异常是抛出public static byte[] decode(InputStream base64) throws IOException
base64 - 输入流IOException - IO异常是抛出public static Bytes decode(Base64.Base64Input base64) throws IOException
base64 - BASE64编码串IOException - IO异常是抛出public static byte[] decode(String base64)
base64 - BASE64编码串Copyright © 2021. All rights reserved.