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.
我必须从外部存储卡卷的特定地址读取一些字节。
我没有要读取的文件,只有驱动器地址,如何使用 Java 读取?我习惯于通过文件路径读取,我从未从卷地址读取...
这是解决方案:
File diskRoot = new File ("\\\\.\\PhysicalDrive0"); RandomAccessFile diskAccess = new RandomAccessFile (diskRoot, "r"); byte[] content = new byte[1024]; diskAccess.readFully(content);
但是它需要以管理员身份运行。