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.
我正在使用RandomAccessFile. 我已经在我的文件中写下了我想写的所有内容,但我无法读取和打印我的文件的一组字节作为字符串。有人可以帮助我吗?
RandomAccessFile
RandomAccessFile rand = ... // Your RandomAccessFile instance. rand.seek(0); for (long i = 0; i < rand.length(); i++) { byte b = rand.readByte(); System.out.print((char)b); }