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
           
 
构造方法摘要
Base64()
           
 
方法摘要
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)
           
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

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.