Class Base64

java.lang.Object
com.alibaba.fastjson.util.Base64

public class Base64 extends Object
Deprecated.
internal api, don't use.
Version:
2.2
Author:
Mikael Grev Date: 2004-aug-02 Time: 11:31:11
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char[]
    Deprecated.
     
    static final int[]
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    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[]
    Deprecated.
    Decodes a BASE64 encoded string that is known to be resonably well formatted.
    static byte[]
    decodeFast(String chars, int offset, int charsLen)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CA

      public static final char[] CA
      Deprecated.
    • IA

      public static final int[] IA
      Deprecated.
  • 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. 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.