Class DiskUsage

java.lang.Object
org.applecommander.usage.DiskUsage
Direct Known Subclasses:
BlockUsage, SectorUsage

public abstract class DiskUsage extends Object
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:
  • Constructor Details

    • DiskUsage

      protected DiskUsage(int unitSize)
  • Method Details

    • getUsageCounts

      public abstract Map<DiskUsage.UsageType, Integer> 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()