FileDocCategorySizeDatePackage
FileReference.javaAPI DocJ2ME CLDC 1.15677Wed Feb 05 15:56:04 GMT 2003kdp.classparser

FileReference

public abstract class FileReference extends Object
Abstraction of a reference to a file or an element of a JAR file
author
Daniel Blaukopf
version
1.2

Fields Summary
Constructors Summary
private FileReference()

 
Methods Summary
public static kdp.classparser.FileReferencecreate(java.io.File file)

        return new BaseFileReference(file);
    
public static kdp.classparser.FileReferencecreate(java.util.jar.JarFile jarFile, java.lang.String element)

        return new JarFileReference(jarFile, element);
    
public static kdp.classparser.FileReferencecreate(java.lang.String base, java.lang.String filename)

        File baseFile = new File(base);
        if (baseFile.isDirectory()) {
            return new BaseFileReference(new File(baseFile, filename));
        } else {
            try {
                return new JarFileReference(baseFile, filename);
            } catch (IOException e) {
                System.err.println("Couldn't open JAR file " + baseFile);
                return new NonExistentFileReference(baseFile + ":" + filename);
            }
        }
    
public abstract booleanexists()

public abstract java.io.InputStreamgetInputStream()

public abstract java.lang.String[]list(java.io.FilenameFilter filter)