Class AbstractHWDiskStore

java.lang.Object
oshi.hardware.common.AbstractHWDiskStore
All Implemented Interfaces:
HWDiskStore
Direct Known Subclasses:
AixHWDiskStore, FreeBsdHWDiskStore, LinuxHWDiskStore, MacHWDiskStore, OpenBsdHWDiskStore, SolarisHWDiskStore, WindowsHWDiskStore

@ThreadSafe public abstract class AbstractHWDiskStore extends Object implements HWDiskStore
Common methods for platform HWDiskStore classes
  • Constructor Details

    • AbstractHWDiskStore

      protected AbstractHWDiskStore(String name, String model, String serial, long size)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: HWDiskStore
      The disk name
      Specified by:
      getName in interface HWDiskStore
      Returns:
      the name
    • getModel

      public String getModel()
      Description copied from interface: HWDiskStore
      The disk model
      Specified by:
      getModel in interface HWDiskStore
      Returns:
      the model
    • getSerial

      public String getSerial()
      Description copied from interface: HWDiskStore
      The disk serial number, if available.
      Specified by:
      getSerial in interface HWDiskStore
      Returns:
      the serial number
    • getSize

      public long getSize()
      Description copied from interface: HWDiskStore
      The size of the disk
      Specified by:
      getSize in interface HWDiskStore
      Returns:
      the disk size, in bytes
    • toString

      public String toString()
      Overrides:
      toString in class Object