dk.netarkivet.common.utils
Class FilebasedFreeSpaceProvider

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

public class FilebasedFreeSpaceProvider
extends java.lang.Object
implements FreeSpaceProvider

File Free Space Provider returns the number of bytes free out of a file.


Field Summary
static java.lang.String FREESPACEPROVIDER_DIR_SETTING
          settings.common.freespaceprovider.file:
The setting for filename of the free space information.
 
Constructor Summary
FilebasedFreeSpaceProvider()
           
 
Method Summary
 long getBytesFree(java.io.File f)
          Returns the number of bytes free which is read out of a file containing the bytes free information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FREESPACEPROVIDER_DIR_SETTING

public static final java.lang.String FREESPACEPROVIDER_DIR_SETTING
settings.common.freespaceprovider.file:
The setting for filename of the free space information.

See Also:
Constant Field Values
Constructor Detail

FilebasedFreeSpaceProvider

public FilebasedFreeSpaceProvider()
Method Detail

getBytesFree

public long getBytesFree(java.io.File f)
Returns the number of bytes free which is read out of a file containing the bytes free information. This file is located in the FREESPACEPROVIDER_DIR and has the name as parameter f. Will return 0 on any IO- or Format-Exceptions.

Specified by:
getBytesFree in interface FreeSpaceProvider
Parameters:
f - a given file
Returns:
the number of bytes free.