1.Stream写byte
String text = "To be or not to be"; // Define a string byte[] textArray = text.getBytes(); for(byte b: textArray) { System.out.write(b); }
2.String => byte
String text = "To be or not to be"; // Define a string byte[] textArray = text.getBytes();