Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java byte array to string

  // string to byte[]
  byte[] bytes = "hello".getBytes(StandardCharsets.UTF_8);

  // byte[] to string
  String s = new String(bytes, StandardCharsets.UTF_8);
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #java #byte #array #string
ADD COMMENT
Topic
Name
7+9 =