TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs.archive
Class FsArchiveFileSystemEntry<E extends FsArchiveEntry>

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

@NotThreadSafe
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public abstract class FsArchiveFileSystemEntry<E extends FsArchiveEntry>
extends FsDecoratingEntry<E>

An abstract archive file system entry which adapts an archive entry to a file system entry.

Author:
Christian Schlichtherle

Nested Class Summary
private static class FsArchiveFileSystemEntry.DirectoryEntry<E extends FsArchiveEntry>
          A directory entry.
private static class FsArchiveFileSystemEntry.FileEntry<E extends FsArchiveEntry>
          A file entry.
(package private) static class FsArchiveFileSystemEntry.HybridEntry<E extends FsArchiveEntry>
          A hybrid file entry.
private static class FsArchiveFileSystemEntry.NamedDirectoryEntry<E extends FsArchiveEntry>
          A named directory entry.
private static class FsArchiveFileSystemEntry.NamedFileEntry<E extends FsArchiveEntry>
          A named file entry.
private static class FsArchiveFileSystemEntry.NamedSpecialDirectoryEntry<E extends FsArchiveEntry>
          A named special file entry.
private static class FsArchiveFileSystemEntry.NamedSpecialFileEntry<E extends FsArchiveEntry>
          A named special file entry.
private static class FsArchiveFileSystemEntry.SpecialDirectoryEntry<E extends FsArchiveEntry>
          A named special directory entry.
private static class FsArchiveFileSystemEntry.SpecialFileEntry<E extends FsArchiveEntry>
          A named special file entry.
 
Nested classes/interfaces inherited from interface de.schlichtherle.truezip.entry.Entry
Entry.Access, Entry.Size, Entry.Type
 
Field Summary
 
Fields inherited from class de.schlichtherle.truezip.fs.FsDecoratingEntry
delegate
 
Fields inherited from interface de.schlichtherle.truezip.entry.Entry
NULL, UNKNOWN
 
Constructor Summary
private FsArchiveFileSystemEntry(E entry)
          Constructs a new instance of Entry.
 
Method Summary
(package private)  boolean add(String member)
          Adds the given base path to the set of members of this directory if and only if this file system entry is a directory.
(package private)  FsArchiveFileSystemEntry<E> clone(FsArchiveFileSystem<E> fileSystem)
           
static
<E extends FsArchiveEntry>
FsArchiveFileSystemEntry<E>
create(FsEntryName name, Entry.Type type, E entry)
          Constructs a new archive file system entry which decorates the given archive entry.
private static
<E extends FsArchiveEntry>
FsArchiveFileSystemEntry<E>
create(String path, Entry.Type type, E entry)
           
 E getEntry()
          Returns the archive entry which is adapted by this archive file system entry.
(package private)  boolean remove(String member)
          Removes the given base path from the set of members of this directory if and only if this file system entry is a directory.
 
Methods inherited from class de.schlichtherle.truezip.fs.FsDecoratingEntry
getName, getSize, getTime, getType, toString
 
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
 

Constructor Detail

FsArchiveFileSystemEntry

private FsArchiveFileSystemEntry(E entry)
Constructs a new instance of Entry.

Method Detail

create

public static <E extends FsArchiveEntry> FsArchiveFileSystemEntry<E> create(FsEntryName name,
                                                                            Entry.Type type,
                                                                            E entry)
Constructs a new archive file system entry which decorates the given archive entry.


create

private static <E extends FsArchiveEntry> FsArchiveFileSystemEntry<E> create(String path,
                                                                             Entry.Type type,
                                                                             E entry)

clone

FsArchiveFileSystemEntry<E> clone(FsArchiveFileSystem<E> fileSystem)

getEntry

public final E getEntry()
Returns the archive entry which is adapted by this archive file system entry.

Returns:
The archive entry which is adapted by this archive file system entry.

add

boolean add(String member)
Adds the given base path to the set of members of this directory if and only if this file system entry is a directory.

Parameters:
member - The non-null base path of the member to add.
Returns:
Whether the member has been added or an equal member was already present in the directory.
Throws:
UnsupportedOperationException - if this file system entry is not a directory.

remove

boolean remove(String member)
Removes the given base path from the set of members of this directory if and only if this file system entry is a directory.

Parameters:
member - The non-null base path of the member to remove.
Returns:
Whether the member has been removed or no equal member was present in the directory.
Throws:
UnsupportedOperationException - if this file system entry is not a directory.

TrueZIP Kernel 7.0-rc2

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