TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs
Class FsDecoratingEntry<E extends Entry>

java.lang.Object
  extended by de.schlichtherle.truezip.fs.FsEntry
      extended by de.schlichtherle.truezip.fs.FsDecoratingEntry<E>
Type Parameters:
E - The type of the decorated entries.
All Implemented Interfaces:
Entry
Direct Known Subclasses:
FsArchiveFileSystemEntry, FsCachingController.CacheEntry

@ThreadSafe
public abstract class FsDecoratingEntry<E extends Entry>
extends FsEntry

An abstract decorator for an entry.

Author:
Christian Schlichtherle

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.schlichtherle.truezip.entry.Entry
Entry.Access, Entry.Size, Entry.Type
 
Field Summary
protected  E delegate
          The decorated entry.
 
Fields inherited from interface de.schlichtherle.truezip.entry.Entry
NULL, UNKNOWN
 
Constructor Summary
protected FsDecoratingEntry(E entry)
          Constructs a new decorating file system entry.
 
Method Summary
 String getName()
          Returns a string representation of the file system entry name.
 long getSize(Entry.Size type)
          Returns the size of this entry.
 long getTime(Entry.Access type)
          Returns the last access time of this entry.
 Entry.Type getType()
          Returns the type of this entry or null if and only if this entry does not exist.
 String toString()
          Returns a string representation of this object for debugging and logging purposes.
 
Methods inherited from class de.schlichtherle.truezip.fs.FsEntry
equals, getMembers, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

delegate

@NonNull
protected final E extends Entry delegate
The decorated entry.

Constructor Detail

FsDecoratingEntry

protected FsDecoratingEntry(@NonNull
                            E entry)
Constructs a new decorating file system entry.

Parameters:
entry - the decorated entry.
Method Detail

getName

public String getName()
Description copied from class: FsEntry
Returns a string representation of the file system entry name.

Specified by:
getName in interface Entry
Specified by:
getName in class FsEntry
Returns:
A string representation of the file system entry name.
See Also:
EntryName.create(String)

getType

public Entry.Type getType()
Description copied from interface: Entry
Returns the type of this entry or null if and only if this entry does not exist.

Returns:
The type of this entry or null if and only if this entry does not exist.

getSize

public long getSize(Entry.Size type)
Description copied from interface: Entry
Returns the size of this entry.

Returns:
The size of the given size type for this entry in bytes, or Entry.UNKNOWN if not specified or the type is unsupported. This method may not be meaningful for non-file entries.

getTime

public long getTime(Entry.Access type)
Description copied from interface: Entry
Returns the last access time of this entry.

Returns:
The last time of the given access type for this entry in milliseconds since the epoch or -1 if not specified or the type is unsupported.

toString

public String toString()
Returns a string representation of this object for debugging and logging purposes.

Overrides:
toString in class FsEntry

TrueZIP Kernel 7.0-rc2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.