public abstract class UnsizedFileStoreBase extends FileStoreBase
FileStoreBase for which the different sizes are unknown
All size operations return Long.MAX_VALUE.
| Modifier | Constructor and Description |
|---|---|
protected |
UnsizedFileStoreBase(String name,
boolean readOnly) |
protected |
UnsizedFileStoreBase(String name,
String type,
boolean readOnly) |
| Modifier and Type | Method and Description |
|---|---|
long |
getTotalSpace()
Returns the size, in bytes, of the file store.
|
long |
getUnallocatedSpace()
Returns the number of unallocated bytes in the file store.
|
long |
getUsableSpace()
Returns the number of bytes available to this Java virtual machine on the
file store.
|
getAttribute, getFileStoreAttributeView, isReadOnly, name, typesupportsFileAttributeView, supportsFileAttributeViewprotected UnsizedFileStoreBase(String name, boolean readOnly)
public final long getTotalSpace()
throws IOException
getTotalSpace in class FileStoreIOException - if an I/O error occurspublic long getUsableSpace()
throws IOException
The returned number of available bytes is a hint, but not a guarantee, that it is possible to use most or any of these bytes. The number of usable bytes is most likely to be accurate immediately after the space attributes are obtained. It is likely to be made inaccurate by any external I/O operations including those made on the system outside of this Java virtual machine.
getUsableSpace in class FileStoreIOException - if an I/O error occurspublic long getUnallocatedSpace()
throws IOException
The returned number of unallocated bytes is a hint, but not a guarantee, that it is possible to use most or any of these bytes. The number of unallocated bytes is most likely to be accurate immediately after the space attributes are obtained. It is likely to be made inaccurate by any external I/O operations including those made on the system outside of this virtual machine.
getUnallocatedSpace in class FileStoreIOException - if an I/O error occurs