Class ShrinkWrapFileStore
- java.lang.Object
-
- java.nio.file.FileStore
-
- org.jboss.shrinkwrap.impl.nio.file.ShrinkWrapFileStore
-
public class ShrinkWrapFileStore extends java.nio.file.FileStore
FileStore
implementation for ShrinkWrapArchive
s; immutable and thread-safe.
-
-
Constructor Summary
Constructors Constructor Description ShrinkWrapFileStore(Archive<?> archive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getAttribute(java.lang.String attribute)
<V extends java.nio.file.attribute.FileStoreAttributeView>
VgetFileStoreAttributeView(java.lang.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()
java.lang.String
name()
boolean
supportsFileAttributeView(java.lang.Class<? extends java.nio.file.attribute.FileAttributeView> type)
boolean
supportsFileAttributeView(java.lang.String name)
java.lang.String
toString()
java.lang.String
type()
-
-
-
Field Detail
-
TYPE
private static final java.lang.String TYPE
FileStore
type- See Also:
- Constant Field Values
-
archive
private final Archive<?> archive
Underlying archive
-
-
Constructor Detail
-
ShrinkWrapFileStore
public ShrinkWrapFileStore(Archive<?> archive)
-
-
Method Detail
-
name
public java.lang.String name()
- Specified by:
name
in classjava.nio.file.FileStore
- See Also:
FileStore.name()
-
type
public java.lang.String type()
- Specified by:
type
in classjava.nio.file.FileStore
- See Also:
FileStore.type()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in classjava.nio.file.FileStore
- See Also:
FileStore.isReadOnly()
-
getTotalSpace
public long getTotalSpace() throws java.io.IOException
- Specified by:
getTotalSpace
in classjava.nio.file.FileStore
- Throws:
java.io.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 java.io.IOException
- Specified by:
getUsableSpace
in classjava.nio.file.FileStore
- Throws:
java.io.IOException
- See Also:
FileStore.getUsableSpace()
-
getUnallocatedSpace
public long getUnallocatedSpace() throws java.io.IOException
- Specified by:
getUnallocatedSpace
in classjava.nio.file.FileStore
- Throws:
java.io.IOException
- See Also:
FileStore.getUnallocatedSpace()
-
supportsFileAttributeView
public boolean supportsFileAttributeView(java.lang.Class<? extends java.nio.file.attribute.FileAttributeView> type)
- Specified by:
supportsFileAttributeView
in classjava.nio.file.FileStore
- See Also:
FileStore.supportsFileAttributeView(java.lang.Class)
-
supportsFileAttributeView
public boolean supportsFileAttributeView(java.lang.String name)
- Specified by:
supportsFileAttributeView
in classjava.nio.file.FileStore
- See Also:
FileStore.supportsFileAttributeView(java.lang.String)
-
getFileStoreAttributeView
public <V extends java.nio.file.attribute.FileStoreAttributeView> V getFileStoreAttributeView(java.lang.Class<V> type)
- Specified by:
getFileStoreAttributeView
in classjava.nio.file.FileStore
- See Also:
FileStore.getFileStoreAttributeView(java.lang.Class)
-
getAttribute
public java.lang.Object getAttribute(java.lang.String attribute) throws java.io.IOException
- Specified by:
getAttribute
in classjava.nio.file.FileStore
- Throws:
java.io.IOException
- See Also:
FileStore.getAttribute(java.lang.String)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-