Package com.alibaba.fastjson.util
Class Base64
java.lang.Object
com.alibaba.fastjson.util.Base64
Deprecated.
internal api, don't use.
- Version:
- 2.2
- Author:
- Mikael Grev Date: 2004-aug-02 Time: 11:31:11
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]decodeFast(char[] chars, int offset, int charsLen) Deprecated.Decodes a BASE64 encoded char array that is known to be resonably well formatted.static byte[]decodeFast(String s) Deprecated.Decodes a BASE64 encoded string that is known to be resonably well formatted.static byte[]decodeFast(String chars, int offset, int charsLen) Deprecated.
-
Field Details
-
CA
public static final char[] CADeprecated. -
IA
public static final int[] IADeprecated.
-
-
Constructor Details
-
Base64
public Base64()Deprecated.
-
-
Method Details
-
decodeFast
public static byte[] decodeFast(char[] chars, int offset, int charsLen) Deprecated.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.- Parameters:
chars- The source array. Length 0 will return an empty array.nullwill throw an exception.- Returns:
- The decoded array of bytes. May be of length 0.
-
decodeFast
Deprecated. -
decodeFast
Deprecated.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.- Parameters:
s- The source string. Length 0 will return an empty array.nullwill throw an exception.- Returns:
- The decoded array of bytes. May be of length 0.
-