Package 

Class Base64

  • All Implemented Interfaces:

    
    public class Base64
    
                        

    Utilities for encoding and decoding the Base64 representation of binary data. See RFCs 2045 and 3548.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static int DEFAULT
      public final static int NO_PADDING
      public final static int NO_WRAP
      public final static int CRLF
      public final static int URL_SAFE
      public final static int NO_CLOSE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static Array<byte> decode(String str, int flags) Decode the Base64-encoded data in input and return the data in a new byte array.
      static Array<byte> decode(Array<byte> input, int flags) Decode the Base64-encoded data in input and return the data in a new byte array.
      static Array<byte> decode(Array<byte> input, int offset, int len, int flags) Decode the Base64-encoded data in input and return the data in a new byte array.
      static String encodeToString(Array<byte> input, int flags) Base64-encode the given data and return a newly allocated String with the result.
      static String encodeToString(Array<byte> input, int offset, int len, int flags) Base64-encode the given data and return a newly allocated String with the result.
      static Array<byte> encode(Array<byte> input, int flags) Base64-encode the given data and return a newly allocated byte[] with the result.
      static Array<byte> encode(Array<byte> input, int offset, int len, int flags) Base64-encode the given data and return a newly allocated byte[] with the result.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • decode

         static Array<byte> decode(String str, int flags)

        Decode the Base64-encoded data in input and return the data in a new byte array.

        The padding '=' characters at the end are considered optional, but if any are present, there must be the correct number of them.

        Parameters:
        str - the input String to decode, which is converted to bytes using the default charset
        flags - controls certain features of the decoded output.
      • decode

         static Array<byte> decode(Array<byte> input, int flags)

        Decode the Base64-encoded data in input and return the data in a new byte array.

        The padding '=' characters at the end are considered optional, but if any are present, there must be the correct number of them.

        Parameters:
        input - the input array to decode
        flags - controls certain features of the decoded output.
      • decode

         static Array<byte> decode(Array<byte> input, int offset, int len, int flags)

        Decode the Base64-encoded data in input and return the data in a new byte array.

        The padding '=' characters at the end are considered optional, but if any are present, there must be the correct number of them.

        Parameters:
        input - the data to decode
        offset - the position within the input array at which to start
        len - the number of bytes of input to decode
        flags - controls certain features of the decoded output.
      • encodeToString

         static String encodeToString(Array<byte> input, int flags)

        Base64-encode the given data and return a newly allocated String with the result.

        Parameters:
        input - the data to encode
        flags - controls certain features of the encoded output.
      • encodeToString

         static String encodeToString(Array<byte> input, int offset, int len, int flags)

        Base64-encode the given data and return a newly allocated String with the result.

        Parameters:
        input - the data to encode
        offset - the position within the input array at which to start
        len - the number of bytes of input to encode
        flags - controls certain features of the encoded output.
      • encode

         static Array<byte> encode(Array<byte> input, int flags)

        Base64-encode the given data and return a newly allocated byte[] with the result.

        Parameters:
        input - the data to encode
        flags - controls certain features of the encoded output.
      • encode

         static Array<byte> encode(Array<byte> input, int offset, int len, int flags)

        Base64-encode the given data and return a newly allocated byte[] with the result.

        Parameters:
        input - the data to encode
        offset - the position within the input array at which to start
        len - the number of bytes of input to encode
        flags - controls certain features of the encoded output.