This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In Java there is nothing to do with hadware or Operating System. You can only find the No. of bytes in a File not in terms of disk space. The only way is to write Operating System Specific code (in C Language)to find out the file size and access the code using JNI from Java.