All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.archiveaccessor.filestore.FolderBucket

java.lang.Object
   |
   +----com.ibm.archiveaccessor.filestore.FolderBucket

public class FolderBucket
extends Object
implements Cloneable, Serializable
The FolderBucket class holds the list of files of a folder.


Constructor Index

 o FolderBucket()
Creates a bucket with no content.
 o FolderBucket(String)
Creates a bucket with the list of files of a folder.
 o FolderBucket(String, String)
Creates a bucket with the filtered list of files of a folder.

Method Index

 o clone()
Clones the folder bucket.
 o get(String)
Returns the byte array associated with the given file name.
 o modified(String)
Returns the time when an entry was last modified.
 o open(String)
Opens the folder bucket.
 o put(String, long)
Associates a name and a value.
 o remove(String)
Removes the file name from the folder bucket.
 o resources()
Returns an enumeration of the file names.
 o size()
Returns the number of file namess in the folder bucket.

Constructors

 o FolderBucket
 public FolderBucket()
Creates a bucket with no content.

 o FolderBucket
 public FolderBucket(String aFolder) throws IOException, SecurityException
Creates a bucket with the list of files of a folder.

Parameters:
aFolder - the name of a folder.
Throws: IOException
may be thrown when reading from the input stream
Throws: SecurityException
if a security manager exists, its checkRead method is called with the pathname of this folder to see if the application is allowed read access to the folder.
 o FolderBucket
 public FolderBucket(String aFolder,
                     String aFilter) throws IOException, SecurityException
Creates a bucket with the filtered list of files of a folder.

Parameters:
aFolder - the name of a folder.
aFilter - a file name filter.
Throws: IOException
may be thrown when reading from the input stream
Throws: SecurityException
if a security manager exists, its checkRead method is called with the pathname of this folder to see if the application is allowed read access to the folder.

Methods

 o open
 public void open(String aFolder)
Opens the folder bucket.

 o clone
 public synchronized Object clone()
Clones the folder bucket.

Overrides:
clone in class Object
 o get
 public synchronized byte[] get(String name) throws IOException
Returns the byte array associated with the given file name.

Parameters:
name - a /-seperated path name, complete with file extensions.
Returns:
the associated byte array or null.
 o modified
 public synchronized long modified(String aName)
Returns the time when an entry was last modified.

Parameters:
aName - a /-seperated path name, complete with file extensions.
Returns:
the time in milliseconds, or 0.
 o put
 public synchronized void put(String aName,
                              long aTime)
Associates a name and a value.

Parameters:
aName - a /-seperated path name, complete with file extensions.
aTime - the time that the file represented by this name was last modified.
 o resources
 public Enumeration resources()
Returns an enumeration of the file names.

 o remove
 public synchronized void remove(String aName)
Removes the file name from the folder bucket.

Parameters:
aName - a /-seperated path name, complete with file extensions.
 o size
 public synchronized int size()
Returns the number of file namess in the folder bucket.

Returns:
the number of file names in the folder bucket.

All Packages  Class Hierarchy  This Package  Previous  Next  Index