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
Java can only access files. Unix has the concept of "raw devices" as files in the /dev directory, so what you want is possible there. But not on windows, because it has no such file representation of the raw HD data.
@hunsricker : note that accessing raw devices require some privileges (depends on drive : removable or not / depends on file system for WinXP : iso9660 is allowed, FAT is not).
Note also that size of read does matter (depending on OS) : On an iso9660 filesystem, read(1024 bytes) works on XP but fails on Seven. On Seven it look like the reads must be block aligned : read(2048 bytes) works.