Class EncodingUtils


  • public class EncodingUtils
    extends Object
    Provides utility methods around string encoding.
    • Constructor Detail

      • EncodingUtils

        public EncodingUtils()
    • Method Detail

      • toString

        public static String toString​(byte[] data,
                                      String encoding)
        Convert a byte array to a string using a specific encoding.
        Parameters:
        data - the source byte array (required)
        encoding - the encoding to use
        Returns:
        a string with the contents of the byte array decoded into characters