home *** CD-ROM | disk | FTP | other *** search
- package espresso;
-
- import java.io.File;
- import java.io.IOException;
- import java.util.Hashtable;
-
- abstract class GeneralFile {
- private static Hashtable opened = new Hashtable();
-
- static GeneralFile open(String var0, String var1) {
- if (var0 == null) {
- return new PlainFile(new File(var1));
- } else if (var0.endsWith(".zip")) {
- Object var2 = (GeneralFile)opened.get(var0);
- if (var2 == null) {
- var2 = new ZipDir(new File(var0));
- if (((GeneralFile)var2).isDirectory()) {
- opened.put(var0, var2);
- }
- }
-
- return ((GeneralFile)var2).open(var1);
- } else {
- return new PlainFile(new File(var0, var1));
- }
- }
-
- abstract GeneralFile open(String var1);
-
- abstract String[] list() throws IOException;
-
- abstract byte[] read() throws IOException;
-
- abstract boolean isDirectory();
-
- abstract boolean exists();
-
- abstract String getPath();
-
- public GeneralFile() {
- }
- }
-