Class Base64

java.lang.Object
com.reve.utils.bytearray.Base64

public class Base64 extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    base64Decode(byte[] data, int offset, int datalen)
     
    static int
    base64Encode(byte[] data, int offset, int len)
     
    static String
    encode(byte[] data)
    Get the encoded base 64 string from the given byte array.
    static String
    encode(byte[] data, int offset, int len)
    Get the encoded base 64 string from the given byte array.
    static byte[]
    getEncodedBytes(byte[] data)
    Encode the given byte array
    static byte[]
    getEncodedBytes(byte[] data, int offset, int len)
    Encode the given byte array

    Methods inherited from class java.lang.Object

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

    • Base64

      public Base64()
  • Method Details

    • base64Decode

      public static int base64Decode(byte[] data, int offset, int datalen)
    • base64Encode

      public static int base64Encode(byte[] data, int offset, int len)
    • encode

      public static String encode(byte[] data)
      Get the encoded base 64 string from the given byte array.
      Parameters:
      data - byte array to be encoded
      Returns:
      the base 64 encoded string
    • encode

      public static String encode(byte[] data, int offset, int len)
      Get the encoded base 64 string from the given byte array.
      Parameters:
      data - byte array to be encoded
      offset - starting index of the byte array to be encoded
      len - length of the byte array to be encoded.
      Returns:
      the base 64 encoded string
    • getEncodedBytes

      public static byte[] getEncodedBytes(byte[] data, int offset, int len)
      Encode the given byte array
      Parameters:
      data - byte array to be encoded
      offset - starting index of the byte array to be encoded
      len - length of the byte array to be encoded.
      Returns:
      the encoded byte array.
    • getEncodedBytes

      public static byte[] getEncodedBytes(byte[] data)
      Encode the given byte array
      Parameters:
      data - @param data byte array to be encoded
      Returns:
      the encoded byte array.