0
randomAccessFileで書いた順序が読み込んだ順序と一致しないと思います。これを修正するにはどうすればよいですか?ビッグ/リトルエンディアンとは関係がありますか?JavaのRandomAccessFileの読み書き順序
RandomAccessFile accessor = new RandomAccessFile (new File("passwd_file"), "rws");
accessor.write(macbytes);
//System.out.println(macbytes);
byte[] test=new byte[(int) accessor.length()];
accessor.seek(0);
accessor.read(test);
//System.out.println(test);
if (test.equals(macbytes))System.out.println("true");
else System.out.println("false");
http://stackoverflow.com/questions/8777257/equals-vs-arrays-equals-in-java – tkausl