字符串到char数组很简单
String str = "someString"; char[] charArray = str.toCharArray();
您能否再解释一下您要做什么?
更新
如果我理解您的新评论,则可以使用字节数组,并提供示例。
byte[] bytes = ByteBuffer.allocate(4).putInt(1695609641).array();for (byte b : bytes) { System.out.format("0x%x ", b);}具有以下输出
0x65 0x10 0xf3 0x29



