com.alibaba.fastjson.util
类 Base64
java.lang.Object
com.alibaba.fastjson.util.Base64
public class Base64
- extends Object
- 版本:
- 2.2
- 作者:
- Mikael Grev Date: 2004-aug-02 Time: 11:31:11
|
字段摘要 |
static char[] |
CA
|
static int[] |
IA
|
|
方法摘要 |
static byte[] |
decodeFast(char[] chars,
int offset,
int charsLen)
Decodes a BASE64 encoded char array that is known to be resonably well formatted. |
static byte[] |
decodeFast(String s)
Decodes a BASE64 encoded string that is known to be resonably well formatted. |
static byte[] |
decodeFast(String chars,
int offset,
int charsLen)
|
CA
public static final char[] CA
IA
public static final int[] IA
Base64
public Base64()
decodeFast
public static final byte[] decodeFast(char[] chars,
int offset,
int charsLen)
- Decodes a BASE64 encoded char array that is known to be resonably well formatted. The method is about twice as
fast as #decode(char[]). The preconditions are:
+ The array must have a line length of 76 chars OR no line separators at all (one line).
+ Line separator must be "\r\n", as specified in RFC 2045 + The array must not contain illegal characters within
the encoded string
+ The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
- 参数:
chars - The source array. Length 0 will return an empty array. null will throw an exception.
- 返回:
- The decoded array of bytes. May be of length 0.
decodeFast
public static final byte[] decodeFast(String chars,
int offset,
int charsLen)
decodeFast
public static final byte[] decodeFast(String s)
- Decodes a BASE64 encoded string that is known to be resonably well formatted. The method is about twice as fast
as decode(String). The preconditions are:
+ The array must have a line length of 76 chars OR no line separators at all (one line).
+ Line separator must be "\r\n", as specified in RFC 2045 + The array must not contain illegal characters within
the encoded string
+ The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
- 参数:
s - The source string. Length 0 will return an empty array. null will throw an exception.
- 返回:
- The decoded array of bytes. May be of length 0.
Copyright © 2012-2015 Alibaba Group. All Rights Reserved.