public class Storage
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
name
Storage name
|
| Modifier | Constructor and Description |
|---|---|
protected |
Storage() |
| Modifier and Type | Method and 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() |
public java.lang.String toString()
toString in class java.lang.Objectpublic static Storage getByName(java.lang.String name) throws HostNotFoundException, java.lang.NullPointerException, NativeException, StorageNotFoundException
name - The name of the storage to get.StorageNotFoundException - if the name of the storage is not valid.NativeException - if the native version of this method failed.HostNotFoundExceptionjava.lang.NullPointerExceptionpublic java.lang.String getName()
public long getSize()
public long getFreeSize()
public long getUsedSize()
public java.lang.String getProperty(java.lang.String name)
public void setProperty(java.lang.String name,
java.lang.String value)
public java.lang.String getHost()
public static Storage[] all()
public static void nativeInit()