Class Storage


  • public class Storage
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String name
      Storage name
    • Constructor Summary

      Constructors 
      Constructor Description
      Storage()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Storage[] all()
      This static method returns all of the storages of the installed platform.
      static Storage getByName​(java.lang.String name)
      This static method gets a storage instance associated with a native storage of your platform.
      long getFreeSize()
      This method returns the free size (in bytes) of a storage element.
      java.lang.String getHost()
      Returns the host name the storage is attached to
      java.lang.String getName()
      This method returns the name of a storage.
      java.lang.String getProperty​(java.lang.String name)
      Returns the value of a given storage property.
      long getSize()
      This method returns the size (in bytes) of a storage element.
      long getUsedSize()
      This method returns the used size (in bytes) of a storage element.
      static void nativeInit()
      Class initializer, to initialize various JNI stuff
      void setProperty​(java.lang.String name, java.lang.String value)
      Change the value of a given storage property.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
        Storage name
    • Constructor Detail

      • Storage

        public Storage()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getName

        public java.lang.String getName()
        This method returns the name of a storage.
        Returns:
        The name of the storage.
      • getSize

        public long getSize()
        This method returns the size (in bytes) of a storage element.
        Returns:
        The size (in bytes) of the storage element.
      • getFreeSize

        public long getFreeSize()
        This method returns the free size (in bytes) of a storage element.
        Returns:
        The free size (in bytes) of the storage element.
      • getUsedSize

        public long getUsedSize()
        This method returns the used size (in bytes) of a storage element.
        Returns:
        The used size (in bytes) of the storage element.
      • getProperty

        public java.lang.String getProperty​(java.lang.String name)
        Returns the value of a given storage property.
      • setProperty

        public void setProperty​(java.lang.String name,
                                java.lang.String value)
        Change the value of a given storage property.
      • getHost

        public java.lang.String getHost()
        Returns the host name the storage is attached to
        Returns:
        the host name the storage is attached to
      • all

        public static Storage[] all()
        This static method returns all of the storages of the installed platform.
        Returns:
        An array containing all the storages installed.
      • nativeInit

        public static void nativeInit()
        Class initializer, to initialize various JNI stuff