Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ページからバイト配列を文字列として読み取っています。例: "80 75 7 8 0 0". この文字列をJavaでバイト配列に変換したいと思います。誰でも私を助けてくれますか、どの方法を使用できるか教えてもらえますか?
"80 75 7 8 0 0"
ありがとうございました。
試す:
String[] bytesString = originalString.split(" "); byte[] bytes = new byte[bytesString.length]; for(int i = 0 ; i < bytes.length ; ++i) { bytes[i] = Byte.parseByte(bytesString[i]); }