public class TarFileEntry extends TarEntry implements ArchiveFileEntry<TarEntry,TarDirectoryEntry>
Tar entry objects are always immutable.
TarDirectoryEntry
,
TarSymbolicLinkEntry
Modifier and Type | Method and Description |
---|---|
long |
getDataSize()
Get the size of the file data for this Tar file entry.
|
protected org.entityfs.entityattrs.unix.UnixEntityMode |
getDefaultEntityMode()
Subclasses implement this to return the default Unix entity mode if none
is set in the Tar file.
|
long |
getSize()
Get the size of the file data for this Tar file entry.
|
long |
getStartPosOfFileData()
Get the start position of file data in the Tar file for this Tar file
entry.
|
org.entityfs.lock.EntityLock |
getWriteLock()
This method returns a dummy lock.
|
boolean |
isWriteLockedByCurrentThread()
This method always returns
true . |
org.entityfs.lock.EntityLock |
lockForWriting()
This method returns a dummy lock.
|
ScatteringByteChannel |
openChannelForRead()
Open a
ScatteringByteChannel that a client can use to read file
data from the Tar file entry. |
org.entityfs.RandomAccess |
openForRandomAccess(org.entityfs.support.io.RandomAccessMode ram) |
InputStream |
openForRead()
Open an
InputStream that a client can use to read file data from
the Tar file entry. |
getChecksum, getEntityMode, getLastModificationTime, getOwnerGid, getOwnerUid
getCollaborator, getLocation, getName, getParent, getReadLock, isReadLockedByCurrentThread, lockForReading
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLocation, getParent
protected org.entityfs.entityattrs.unix.UnixEntityMode getDefaultEntityMode()
TarEntry
getDefaultEntityMode
in class TarEntry
public org.entityfs.lock.EntityLock lockForWriting() throws org.entityfs.exception.LockTimeoutException
lockForWriting
in interface org.entityfs.lock.WriteLockable
org.entityfs.exception.LockTimeoutException
public org.entityfs.lock.EntityLock getWriteLock()
getWriteLock
in interface org.entityfs.lock.WriteLockable
public boolean isWriteLockedByCurrentThread()
true
.isWriteLockedByCurrentThread
in interface org.entityfs.lock.WriteLockable
true
, always.public ScatteringByteChannel openChannelForRead()
ScatteringByteChannel
that a client can use to read file
data from the Tar file entry.openChannelForRead
in interface org.entityfs.ReadableFile
public InputStream openForRead()
InputStream
that a client can use to read file data from
the Tar file entry.openForRead
in interface org.entityfs.ReadableFile
public org.entityfs.RandomAccess openForRandomAccess(org.entityfs.support.io.RandomAccessMode ram) throws org.entityfs.exception.ReadOnlyException
openForRandomAccess
in interface org.entityfs.RandomlyAccessibleFile
org.entityfs.exception.ReadOnlyException
public long getStartPosOfFileData()
Clients seldom have to bother with this.
public long getDataSize()
0
and 8589934591
bytes (~ 8.6 Gb) (inclusive).
This method returns the same value as getSize()
.
getDataSize
in interface org.entityfs.ReadableFile
public long getSize()
0
and 8589934591
bytes (~ 8.6 Gb) (inclusive).
This method returns the same value as getDataSize()
.
getSize
in interface org.entityfs.ReadableFile