TrueZIP 6.8.3

de.schlichtherle.io
Class ArchiveEntryMetaData

java.lang.Object
  extended by de.schlichtherle.io.ArchiveEntryMetaData

public class ArchiveEntryMetaData
extends Object

This class is not intended for public use! It's only public for technical reasons and may get renamed or entirely disappear without notice.

Annotates an ArchiveEntry with the fields and methods required to implement the concept of a directory.

Since:
TrueZIP 6.0
Author:
Christian Schlichtherle

Field Summary
(package private)  Set children
          If the entry from which this object has been created represents a directory, then this is a valid reference to a set of Strings, representing the children names.
private static ThreadLocal threadLocal
          This thread local variable returns an ArrayList which is used as a temporary buffer to implement filtered list methods.
 
Constructor Summary
ArchiveEntryMetaData(ArchiveEntry entry)
          A package private constructor.
 
Method Summary
(package private)  String[] list()
          Returns the names of the members in this directory in a newly created array.
(package private)  String[] list(FilenameFilter filenameFilter, File dir)
          Returns the names of the members in this directory which are accepted by filenameFilter in a newly created array.
(package private)  File[] listFiles(FileFilter fileFilter, File dir, FileFactory factory)
          Returns File objects for the members in this directory which are accepted by filenameFilter in a newly created array.
(package private)  File[] listFiles(FilenameFilter filenameFilter, File dir, FileFactory factory)
          Returns File objects for the members in this directory which are accepted by filenameFilter in a newly created array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadLocal

private static final ThreadLocal threadLocal
This thread local variable returns an ArrayList which is used as a temporary buffer to implement filtered list methods.


children

final Set children
If the entry from which this object has been created represents a directory, then this is a valid reference to a set of Strings, representing the children names. Otherwise this field is initialized with null.

Constructor Detail

ArchiveEntryMetaData

ArchiveEntryMetaData(ArchiveEntry entry)
A package private constructor. Used by the factory in this package only.

Method Detail

list

String[] list()
Returns the names of the members in this directory in a newly created array. The returned array is not sorted. This is the most efficient list method.

Throws:
NullPointerException - If the entry from which this object has been created is not a directory.

list

String[] list(FilenameFilter filenameFilter,
              File dir)
Returns the names of the members in this directory which are accepted by filenameFilter in a newly created array. dir is used as the directory argument for the filenameFilter. The returned array is not sorted.

Parameters:
filenameFilter - a valid object - must not be null.
dir - the directory represented as a File object.
Throws:
NullPointerException - If the entry from which this object has been created is not a directory.

listFiles

File[] listFiles(FilenameFilter filenameFilter,
                 File dir,
                 FileFactory factory)
Returns File objects for the members in this directory which are accepted by filenameFilter in a newly created array. dir is used as the directory argument for the filenameFilter. The returned array is not sorted.

Parameters:
filenameFilter - may be null to accept all members.
dir - the directory represented as a File object.
Throws:
NullPointerException - If the entry from which this object has been created is not a directory.

listFiles

File[] listFiles(FileFilter fileFilter,
                 File dir,
                 FileFactory factory)
Returns File objects for the members in this directory which are accepted by filenameFilter in a newly created array. dir is used as the directory argument for the filenameFilter. The returned array is not sorted.

Parameters:
fileFilter - may be null to accept all members.
dir - the directory represented as a File object.
Throws:
NullPointerException - If the entry from which this object has been created is not a directory.

TrueZIP 6.8.3

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