KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > javaguard > FileContainer


1 /**
2  * JavaGuard -- an obfuscation package for Java classfiles.
3  *
4  * Copyright (c) 2002 Thorsten Heit (theit@gmx.de)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * The author may be contacted at theit@gmx.de.
21  *
22  *
23  * $Id: FileContainer.java,v 1.3 2002/06/03 13:02:35 glurk Exp $
24  */

25 package net.sf.javaguard;
26
27
28 import java.io.IOException JavaDoc;
29 import java.util.Enumeration JavaDoc;
30 import java.util.SortedSet JavaDoc;
31 import java.util.jar.Manifest JavaDoc;
32
33
34 /** The purpose of a FileContainer is to ease the handling of a list of files
35  * created for example from the entries of a Jar file or from the contents of a
36  * local directory that match a given regular expression.
37  *
38  * @author <a HREF="mailto:theit@gmx.de">Thorsten Heit</a>
39  */

40 public interface FileContainer {
41   /** Returns the name for the file container.
42    * @return the name for the file container
43    */

44   public String JavaDoc getName();
45   
46   
47   /** Returns the Manifest file for the file container.
48    * @return Manifest file
49    * @throws IOException if an I/O error occurs
50    */

51   public Manifest JavaDoc getManifest()
52   throws IOException JavaDoc;
53   
54   
55   /** Returns a sorted set of the file names in this file container. Each
56    * element in the set must be a string in which packages/directories are
57    * separated by "/".
58    * @return a sorted set of file names; must not be null
59    */

60   public SortedSet JavaDoc getFileNameSet();
61   
62   
63   /** Removes file entries in the current file container that are already
64    * contained in the given file container.
65    * @param fileContainer the file container to compare to
66    */

67   public void removeDuplicates(FileContainer fileContainer);
68   
69   
70   /** Returns an enumeration of the elements of the file container. The
71    * <code>nextElement()</code> method of such an enumeration must return a
72    * subclass of {@link FileEntry}.
73    * @return an enumeration of the elements of the file container
74    */

75   public Enumeration JavaDoc enumeration();
76 }
77
Popular Tags