Class TarFileSystem
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractFileSystem
org.apache.commons.vfs2.provider.tar.TarFileSystem
- All Implemented Interfaces:
FileSystem,VfsComponent
A read-only file system for Tar files.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTarFileSystem(AbstractFileName rootName, FileObject parentLayer, FileSystemOptions fileSystemOptions) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCapabilities(Collection<Capability> caps) Returns the capabilities of this file system.protected FileObjectcreateFile(AbstractFileName name) Creates a file object.protected org.apache.commons.compress.archivers.tar.TarArchiveInputStreamcreateTarFile(File file) protected TarFileObjectcreateTarFileObject(AbstractFileName name, org.apache.commons.compress.archivers.tar.TarArchiveEntry entry) protected voidClose the underlying link used to access the filesgetInputStream(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry) protected org.apache.commons.compress.archivers.tar.TarArchiveInputStreamvoidinit()Initializes this component.protected voidMethods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystem
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttributeMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
-
Constructor Details
-
TarFileSystem
protected TarFileSystem(AbstractFileName rootName, FileObject parentLayer, FileSystemOptions fileSystemOptions) throws FileSystemException - Throws:
FileSystemException
-
-
Method Details
-
init
Description copied from class:AbstractFileSystemInitializes this component.- Specified by:
initin interfaceVfsComponent- Overrides:
initin classAbstractFileSystem- Throws:
FileSystemException- if an error occurs.
-
getInputStream
public InputStream getInputStream(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry) throws FileSystemException - Throws:
FileSystemException
-
resetTarFile
- Throws:
FileSystemException
-
getTarFile
protected org.apache.commons.compress.archivers.tar.TarArchiveInputStream getTarFile() throws FileSystemException- Throws:
FileSystemException
-
createTarFileObject
protected TarFileObject createTarFileObject(AbstractFileName name, org.apache.commons.compress.archivers.tar.TarArchiveEntry entry) throws FileSystemException - Throws:
FileSystemException
-
createTarFile
protected org.apache.commons.compress.archivers.tar.TarArchiveInputStream createTarFile(File file) throws FileSystemException - Throws:
FileSystemException
-
doCloseCommunicationLink
Description copied from class:AbstractFileSystemClose the underlying link used to access the files- Overrides:
doCloseCommunicationLinkin classAbstractFileSystem
-
addCapabilities
Returns the capabilities of this file system.- Specified by:
addCapabilitiesin classAbstractFileSystem- Parameters:
caps- collections of Capabilities, can be immutable.
-
createFile
Creates a file object.- Specified by:
createFilein classAbstractFileSystem- Parameters:
name- name referencing the new file.- Returns:
- new created FileObject.
- Throws:
FileSystemException
-