Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to access a hard drive directly.

843789Aug 13 2009 — edited Aug 16 2009
Hi all,

First of all, I am sorry if the information I am asking for is already somewhere here in the forums.. I did search for a bit but I couldn't find anything! This is my first post here and I am looking for some directions.

I normally program in a mixture of C and C++ in Windows... all self-taught and very messy. I am now doing some Java courses to get some discipline and good programming habits and it's all good and fun but I want to start using the concepts I am learning!

In C and C++ I normally write code that reads a Hard Drive sectors and interprets the File System structures (mainly FAT and NTFS). I want to start re-writing some of the code in Java while applying the concepts but I am having difficulties finding a way to access the devices in a similar way that I could do with the Windows APIs.

I normally use CreateFile to open a device, ReadFile and WriteFile to read and write bytes from the device and SetFilePointerEx to move around the device.

Would anyone point me in the right direction?

Thanks a lot in advance!

io
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2009
Added on Aug 13 2009
19 comments
615 views