public class TarFileObject extends AbstractFileObject<TarFileSystem>
Modifier and Type | Field and Description |
---|---|
private java.util.HashSet<java.lang.String> |
children |
private org.apache.commons.compress.archivers.tar.TarArchiveEntry |
entry
The TarArchiveEntry
|
private FileType |
type |
Modifier | Constructor and Description |
---|---|
protected |
TarFileObject(AbstractFileName name,
org.apache.commons.compress.archivers.tar.TarArchiveEntry entry,
TarFileSystem fs,
boolean tarExists) |
Modifier and Type | Method and Description |
---|---|
protected void |
attachChild(FileName childName)
Attaches a child.
|
protected long |
doGetContentSize()
Returns the size of the file content (in bytes).
|
protected java.io.InputStream |
doGetInputStream()
Creates an input stream to read the file content from.
|
protected long |
doGetLastModifiedTime()
Returns the last modified time of this file.
|
protected FileType |
doGetType()
Returns the file's type.
|
protected java.lang.String[] |
doListChildren()
Lists the children of the file.
|
boolean |
isWriteable()
Determines if this file can be written to.
|
protected void |
setTarEntry(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
Sets the details for this file object.
|
canRenameTo, childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doAttach, doCreateFileContent, doCreateFolder, doDelete, doDetach, doGetAttributes, doGetCertificates, doGetOutputStream, doGetRandomAccessContent, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doIsWriteable, doListChildrenResolved, doRemoveAttribute, doRename, doSetAttribute, doSetExecutable, doSetLastModifiedTime, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toString
private org.apache.commons.compress.archivers.tar.TarArchiveEntry entry
private final java.util.HashSet<java.lang.String> children
private FileType type
protected TarFileObject(AbstractFileName name, org.apache.commons.compress.archivers.tar.TarArchiveEntry entry, TarFileSystem fs, boolean tarExists) throws FileSystemException
FileSystemException
protected void setTarEntry(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
protected void attachChild(FileName childName)
childName
- Name of child to remember.public boolean isWriteable() throws FileSystemException
isWriteable
in interface FileObject
isWriteable
in class AbstractFileObject<TarFileSystem>
true
if this file is writeable, false
if not.FileSystemException
- if an error occurs.protected FileType doGetType()
doGetType
in class AbstractFileObject<TarFileSystem>
protected java.lang.String[] doListChildren()
doListChildren
in class AbstractFileObject<TarFileSystem>
protected long doGetContentSize()
doGetType()
returns FileType.FILE
.doGetContentSize
in class AbstractFileObject<TarFileSystem>
protected long doGetLastModifiedTime() throws java.lang.Exception
doGetLastModifiedTime
in class AbstractFileObject<TarFileSystem>
java.lang.Exception
- if an error occurs.protected java.io.InputStream doGetInputStream() throws java.lang.Exception
doGetType()
returns FileType.FILE
. The input stream
returned by this method is guaranteed to be closed before this
method is called again.doGetInputStream
in class AbstractFileObject<TarFileSystem>
java.lang.Exception
- if an error occurs.