Class TarFileObject

    • Field Detail

      • entry

        private org.apache.commons.compress.archivers.tar.TarArchiveEntry entry
        The TarArchiveEntry
      • children

        private final java.util.HashSet<java.lang.String> children
    • Constructor Detail

      • TarFileObject

        protected TarFileObject​(AbstractFileName name,
                                org.apache.commons.compress.archivers.tar.TarArchiveEntry entry,
                                TarFileSystem fs,
                                boolean tarExists)
    • Method Detail

      • setTarEntry

        protected void setTarEntry​(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
        Sets the details for this file object. Consider this method package private. TODO Might be made package private in the next major version.
        Parameters:
        entry - Tar archive entry.
      • attachChild

        protected void attachChild​(FileName childName)
        Attaches a child.
        Parameters:
        childName - Name of child to remember.
      • doListChildren

        protected java.lang.String[] doListChildren()
        Lists the children of the file.
        Specified by:
        doListChildren in class AbstractFileObject<TarFileSystem>
        Returns:
        a possible empty String array if the file is a directory or null or an exception if the file is not a directory or can't be read.
      • doGetLastModifiedTime

        protected long doGetLastModifiedTime()
                                      throws java.lang.Exception
        Returns the last modified time of this file.
        Overrides:
        doGetLastModifiedTime in class AbstractFileObject<TarFileSystem>
        Returns:
        The last modification time.
        Throws:
        java.lang.Exception - if an error occurs.
      • doGetInputStream

        protected java.io.InputStream doGetInputStream​(int bufferSize)
                                                throws java.lang.Exception
        Creates an input stream to read the file content from. Is only called if doGetType() returns FileType.FILE. The input stream returned by this method is guaranteed to be closed before this method is called again.
        Overrides:
        doGetInputStream in class AbstractFileObject<TarFileSystem>
        Parameters:
        bufferSize - Buffer size hint.
        Returns:
        An InputStream to read the file content.
        Throws:
        java.lang.Exception - if an error occurs.