com.alibaba.fastjson.util
Class Base64
- java.lang.Object
-
- com.alibaba.fastjson.util.Base64
-
Deprecated.internal api, don't use.
public class Base64 extends Object
- Version:
- 2.2
- Author:
- Mikael Grev Date: 2004-aug-02 Time: 11:31:11
-
Constructor Summary
Constructors Constructor and Description Base64()
Deprecated.
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description static 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.
-
Method Detail
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.null
will throw an exception. - Returns:
- The decoded array of bytes. May be of length 0.
decodeFast
public static byte[] decodeFast(String chars, int offset, int charsLen)
Deprecated.
decodeFast
public static byte[] decodeFast(String s)
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.null
will throw an exception. - Returns:
- The decoded array of bytes. May be of length 0.
Copyright © 2012–2021 Alibaba Group. All rights reserved.