バイト配列の文字列値を含む文字列があります。この文字列をバイト配列に変換するにはどうすればよいですか? 私が試した方法:
String stringValue="33321232"; //the bytes in String
byte[] bytes= (byte[])stringValue;
System.out.println(getByteArrayAsString(bytes));
メソッドは結果のgetByteArrayAsStringString: を返す必要がある33321232ため、stringValue. (これは私の方法です。うまくいきますが、どうやって取得しbytesますか?)
ありがとうございました!