Class DecoratedFileContent

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.commons.vfs2.FileContent

    public class DecoratedFileContent
    extends Object
    implements org.apache.commons.vfs2.FileContent
    Useful when you need to override a single method in a FileContent object
    • Constructor Detail

      • DecoratedFileContent

        public DecoratedFileContent​(org.apache.commons.vfs2.FileContent fileContent)
    • Method Detail

      • getFile

        public org.apache.commons.vfs2.FileObject getFile()
        Specified by:
        getFile in interface org.apache.commons.vfs2.FileContent
      • getSize

        public long getSize()
                     throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getSize in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getLastModifiedTime

        public long getLastModifiedTime()
                                 throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getLastModifiedTime in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • setLastModifiedTime

        public void setLastModifiedTime​(long l)
                                 throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        setLastModifiedTime in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • hasAttribute

        public boolean hasAttribute​(String s)
                             throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        hasAttribute in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getAttributes

        public Map getAttributes()
                          throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getAttributes in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getAttributeNames

        public String[] getAttributeNames()
                                   throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getAttributeNames in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getAttribute

        public Object getAttribute​(String s)
                            throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getAttribute in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • setAttribute

        public void setAttribute​(String s,
                                 Object o)
                          throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        setAttribute in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • removeAttribute

        public void removeAttribute​(String s)
                             throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        removeAttribute in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getCertificates

        public Certificate[] getCertificates()
                                      throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getCertificates in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getInputStream

        public InputStream getInputStream()
                                   throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getInputStream in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getOutputStream

        public OutputStream getOutputStream()
                                     throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getOutputStream in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getRandomAccessContent

        public org.apache.commons.vfs2.RandomAccessContent getRandomAccessContent​(org.apache.commons.vfs2.util.RandomAccessMode randomAccessMode)
                                                                           throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getRandomAccessContent in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getOutputStream

        public OutputStream getOutputStream​(boolean b)
                                     throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getOutputStream in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • close

        public void close()
                   throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getContentInfo

        public org.apache.commons.vfs2.FileContentInfo getContentInfo()
                                                               throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getContentInfo in interface org.apache.commons.vfs2.FileContent
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface org.apache.commons.vfs2.FileContent
      • write

        public long write​(org.apache.commons.vfs2.FileContent fileContent)
                   throws IOException
        Specified by:
        write in interface org.apache.commons.vfs2.FileContent
        Throws:
        IOException
      • write

        public long write​(org.apache.commons.vfs2.FileObject fileObject)
                   throws IOException
        Specified by:
        write in interface org.apache.commons.vfs2.FileContent
        Throws:
        IOException
      • write

        public long write​(OutputStream outputStream,
                          int i)
                   throws IOException
        Specified by:
        write in interface org.apache.commons.vfs2.FileContent
        Throws:
        IOException