Class CharsetUtils

java.lang.Object
com.avoka.core.util.CharsetUtils

public class CharsetUtils extends Object
Provides charset encoding utilities.
  • Field Details

  • Constructor Details

    • CharsetUtils

      public CharsetUtils()
  • Method Details

    • encodeAsUTF8Bytes

      public static byte[] encodeAsUTF8Bytes(String value)
      Convert the given string to a UTF-8 encoded byte array.
      Parameters:
      value - the string value to encode (required, not null)
      Returns:
      the UTF-8 encoded byte array
    • decodeFromUTF8Bytes

      public static String decodeFromUTF8Bytes(byte[] value)
      Convert the given UTF-8 encoded byte array to a string.
      Parameters:
      value - the the UTF-8 encoded byte array (required, not null)
      Returns:
      the decoded string value