Class Base64Encoder

java.lang.Object
org.jvnet.staxex.Base64Encoder

class Base64Encoder extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final char[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static char
    encode(int i)
     
    static byte
    encodeByte(int i)
     
    private static char[]
     
    static String
    print(byte[] input, int offset, int len)
     
    static int
    print(byte[] input, int offset, int len, char[] buf, int ptr)
    Encodes a byte array into a char array by doing base64 encoding.

    Methods inherited from class java.lang.Object

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

    • encodeMap

      private static final char[] encodeMap
  • Constructor Details

    • Base64Encoder

      Base64Encoder()
  • Method Details

    • initEncodeMap

      private static char[] initEncodeMap()
    • encode

      public static char encode(int i)
    • encodeByte

      public static byte encodeByte(int i)
    • print

      public static String print(byte[] input, int offset, int len)
    • print

      public static int print(byte[] input, int offset, int len, char[] buf, int ptr)
      Encodes a byte array into a char array by doing base64 encoding. The caller must supply a big enough buffer.
      Returns:
      the value of ptr+((len+2)/3)*4, which is the new offset in the output buffer where the further bytes should be placed.