dk.netarkivet.common.utils
Class DefaultFreeSpaceProvider

java.lang.Object
  extended by dk.netarkivet.common.utils.DefaultFreeSpaceProvider
All Implemented Interfaces:
FreeSpaceProvider

public class DefaultFreeSpaceProvider
extends java.lang.Object
implements FreeSpaceProvider

Default Free Space Provider of the number of bytes free on the file system.


Constructor Summary
DefaultFreeSpaceProvider()
           
 
Method Summary
 long getBytesFree(java.io.File f)
          Returns the number of bytes free on the file system that the given file resides on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFreeSpaceProvider

public DefaultFreeSpaceProvider()
Method Detail

getBytesFree

public long getBytesFree(java.io.File f)
Returns the number of bytes free on the file system that the given file resides on. Will return 0 on non-existing files.

Specified by:
getBytesFree in interface FreeSpaceProvider
Parameters:
f - a given file
Returns:
the number of bytes free on the file system where file f resides. 0 if the file cannot be found.