Lines Matching refs:file

8  * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
35 * This class is used to represent a file loaded from the class path, and
36 * can either be a regular file or a zip file entry.
38 * WARNING: The contents of this source file are not part of any
45 * Non-null if this represents a regular file
47 private File file;
50 * Non-null if this represents a zip file entry
56 * Constructor for instance representing a regular file
58 public ClassFile(File file) {
59 this.file = file;
63 * Constructor for instance representing a zip file entry
71 * Returns true if this is zip file entry
78 * Returns input stream to either regular file or zip file entry
81 if (file != null) {
82 return new FileInputStream(file);
93 * Returns true if file exists.
96 return file != null ? file.exists() : true;
103 return file != null ? file.isDirectory() :
111 return file != null ? file.lastModified() : zipEntry.getTime();
115 * Get file path. The path for a zip file entry will also include
116 * the zip file name.
119 if (file != null) {
120 return file.getPath();
127 * Get name of file entry excluding directory name
130 return file != null ? file.getName() : zipEntry.getName();
135 * Get absolute name of file entry
139 if (file != null) {
141 absoluteName = file.getCanonicalPath();
143 absoluteName = file.getAbsolutePath();
153 * Get length of file
156 return file != null ? file.length() : zipEntry.getSize();
160 return (file != null) ? file.toString() : zipEntry.toString();