Class DiskUsage
java.lang.Object
org.applecommander.usage.DiskUsage
- All Implemented Interfaces:
EventListener, ChangeListener<FileStore.FileStoreChangeEvent>, InformationProvider
- Direct Known Subclasses:
BlockUsage, SectorUsage
public abstract class DiskUsage
extends Object
implements InformationProvider, ChangeListener<FileStore.FileStoreChangeEvent>
Provides a generic DiskUsage interface. Note that the assumption of free and used applies
only to disks. Each disk image will supply a more specific usage subclass. Additionally,
the assumption is that supplying a
used and free count is sufficient. That is, total
is the addition of the two and the byte related numbers are just multiplied by the unit size.
Finally, used and free are supplied as functions to allow the disk usage to be a long-term
construct.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIdentifies usage type on this disk. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChangeListener
stateChanged
-
Constructor Details
-
DiskUsage
protected DiskUsage(int unitSize)
-
-
Method Details
-
getUsageCounts
-
getTotal
public abstract int getTotal() -
getUsed
public int getUsed() -
getFree
public int getFree() -
getTotalBytes
public int getTotalBytes() -
getBytesUsed
public int getBytesUsed() -
getBytesFree
public int getBytesFree() -
information
- Specified by:
informationin interfaceInformationProvider
-