Class StringUtils


  • public final class StringUtils
    extends Object
    Common String utilities (formatters, converters, etc).
    • Method Detail

      • decodeToString

        public static String decodeToString​(byte[] bytes,
                                            String encoding)
      • decodeToString

        public static String decodeToString​(byte[] bytes,
                                            Charset encoding)
      • decodePassword

        public static String decodePassword​(String encodedPassword)
      • decodeBASE64

        public static String decodeBASE64​(String string)
        Decodes a BASE64-encoded string.
        Parameters:
        string - BASE64 string
        Returns:
        String the decoded bytes
      • encodeBASE64

        public static String encodeBASE64​(byte[] data)
        Encode the input bytes into BASE64 format.
        Parameters:
        data - - byte array to encode
        Returns:
        encoded string