Class ShrinkWrapFileStore


  • public class ShrinkWrapFileStore
    extends java.nio.file.FileStore
    FileStore implementation for ShrinkWrap Archives; immutable and thread-safe.
    • Field Detail

      • 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 class java.nio.file.FileStore
        See Also:
        FileStore.name()
      • type

        public java.lang.String type()
        Specified by:
        type in class java.nio.file.FileStore
        See Also:
        FileStore.type()
      • isReadOnly

        public boolean isReadOnly()
        Specified by:
        isReadOnly in class java.nio.file.FileStore
        See Also:
        FileStore.isReadOnly()
      • getTotalSpace

        public long getTotalSpace()
                           throws java.io.IOException
        Specified by:
        getTotalSpace in class java.nio.file.FileStore
        Throws:
        java.io.IOException
        See Also:
        FileStore.getTotalSpace()
      • getUsedSpace

        public long getUsedSpace()
        Iterates through the underlying archive, counting the size of each Asset, returning the fully-tallied count in bytes.
        Returns:
      • getUsableSpace

        public long getUsableSpace()
                            throws java.io.IOException
        Specified by:
        getUsableSpace in class java.nio.file.FileStore
        Throws:
        java.io.IOException
        See Also:
        FileStore.getUsableSpace()
      • getUnallocatedSpace

        public long getUnallocatedSpace()
                                 throws java.io.IOException
        Specified by:
        getUnallocatedSpace in class java.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 class java.nio.file.FileStore
        See Also:
        FileStore.supportsFileAttributeView(java.lang.Class)
      • supportsFileAttributeView

        public boolean supportsFileAttributeView​(java.lang.String name)
        Specified by:
        supportsFileAttributeView in class java.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 class java.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 class java.nio.file.FileStore
        Throws:
        java.io.IOException
        See Also:
        FileStore.getAttribute(java.lang.String)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()