Class ShrinkWrapFileStore
- java.lang.Object
-
- java.nio.file.FileStore
-
- org.jboss.shrinkwrap.impl.nio.file.ShrinkWrapFileStore
-
public class ShrinkWrapFileStore extends FileStore
- Author:
- Andrew Lee Rubinger
-
-
Constructor Summary
Constructors Constructor Description ShrinkWrapFileStore(Archive<?> archive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getAttribute(String attribute)
<V extends FileStoreAttributeView>
VgetFileStoreAttributeView(Class<V> type)
long
getTotalSpace()
long
getUnallocatedSpace()
long
getUsableSpace()
long
getUsedSpace()
Iterates through the underlying archive, counting the size of eachAsset
, returning the fully-tallied count in bytes.boolean
isReadOnly()
String
name()
boolean
supportsFileAttributeView(Class<? extends FileAttributeView> type)
boolean
supportsFileAttributeView(String name)
String
toString()
String
type()
-
Methods inherited from class java.nio.file.FileStore
getBlockSize
-
-
-
-
Constructor Detail
-
ShrinkWrapFileStore
public ShrinkWrapFileStore(Archive<?> archive)
-
-
Method Detail
-
name
public String name()
- Specified by:
name
in classFileStore
- See Also:
FileStore.name()
-
type
public String type()
- Specified by:
type
in classFileStore
- See Also:
FileStore.type()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in classFileStore
- See Also:
FileStore.isReadOnly()
-
getTotalSpace
public long getTotalSpace() throws IOException
- Specified by:
getTotalSpace
in classFileStore
- Throws:
IOException
- See Also:
FileStore.getTotalSpace()
-
getUsedSpace
public long getUsedSpace()
Iterates through the underlying archive, counting the size of eachAsset
, returning the fully-tallied count in bytes.- Returns:
-
getUsableSpace
public long getUsableSpace() throws IOException
- Specified by:
getUsableSpace
in classFileStore
- Throws:
IOException
- See Also:
FileStore.getUsableSpace()
-
getUnallocatedSpace
public long getUnallocatedSpace() throws IOException
- Specified by:
getUnallocatedSpace
in classFileStore
- Throws:
IOException
- See Also:
FileStore.getUnallocatedSpace()
-
supportsFileAttributeView
public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type)
- Specified by:
supportsFileAttributeView
in classFileStore
- See Also:
FileStore.supportsFileAttributeView(java.lang.Class)
-
supportsFileAttributeView
public boolean supportsFileAttributeView(String name)
- Specified by:
supportsFileAttributeView
in classFileStore
- See Also:
FileStore.supportsFileAttributeView(java.lang.String)
-
getFileStoreAttributeView
public <V extends FileStoreAttributeView> V getFileStoreAttributeView(Class<V> type)
- Specified by:
getFileStoreAttributeView
in classFileStore
- See Also:
FileStore.getFileStoreAttributeView(java.lang.Class)
-
getAttribute
public Object getAttribute(String attribute) throws IOException
- Specified by:
getAttribute
in classFileStore
- Throws:
IOException
- See Also:
FileStore.getAttribute(java.lang.String)
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-