The following example shows converting Byte array to String.
String class provides the following Constructors for decoding sequence of bytes into a String.
java.lang.String
public String(byte bytes[]) Decodes the given byte array to String with default Charset encoding.
public String(byte bytes[], String charsetName) Decodes the given byte array to String with specified Charset name.
public String(byte bytes[], Charset charset) Decodes the given byte array to String with specified Charset.