How to access specific raw data on disk from java

前端 未结 8 601
一向
一向 2020-11-28 07:59

I\'m trying to use the following code to access one byte with offset of 50 bytes in a raw disk.

randomAccessFile = new RandomAccessFile(\"C:\", \"r\");
rando         


        
8条回答
  •  遥遥无期
    2020-11-28 08:03

    RandomAccessFile is not meant to open directories to manipulate entries, you need to create or remove files. "Acceso denegado" probably mean access denied. To do this anyway you need JNI.

    EDIT: What you are trying to do, is really complicated, there is no common way to do that. You can access the harddisc sector by sector, but then you would have to interpret it's structure, which obviously depends on the file system, FAT,NTFS,HPFS etc.

提交回复
热议问题