Lines Matching defs: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
46 * a {@link java.net.URI} or a file.
55 * specified file.</li>
61 * or file. If there is no associated application or the associated
64 * <p> An application is registered to a URI or file type; for
65 * example, the {@code "sxi"} file extension is typically registered
179 * <p>Even when the platform supports an action, a file or URI may
182 * action. But for a specific file, there may not be an
197 * Checks if the file is a valid file and readable.
201 * denies read access to the file
202 * @throws NullPointerException if file is null
203 * @throws IllegalArgumentException if file doesn't exist
205 private static void checkFileValidation(File file){
206 if (file == null) throw new NullPointerException("File must not be null");
208 if (!file.exists()) {
209 throw new IllegalArgumentException("The file: "
210 + file.getPath() + " doesn't exist.");
213 file.canRead();
245 * Launches the associated application to open the file.
247 * <p> If the specified file is a directory, the file manager of
250 * @param file the file to be opened with the associated application
251 * @throws NullPointerException if {@code file} is {@code null}
252 * @throws IllegalArgumentException if the specified file doesn't
256 * @throws IOException if the specified file has no associated
260 * method denies read access to the file, or it denies the
266 public void open(File file) throws IOException {
270 checkFileValidation(file);
272 peer.open(file);
276 * Launches the associated editor application and opens a file for
279 * @param file the file to be opened for editing
280 * @throws NullPointerException if the specified file is {@code null}
281 * @throws IllegalArgumentException if the specified file doesn't
285 * @throws IOException if the specified file has no associated
289 * method denies read access to the file, or {@link
291 * denies write access to the file, or it denies the
297 public void edit(File file) throws IOException {
301 file.canWrite();
302 checkFileValidation(file);
304 peer.edit(file);
308 * Prints a file with the native desktop printing facility, using
311 * @param file the file to be printed
312 * @throws NullPointerException if the specified file is {@code
314 * @throws IllegalArgumentException if the specified file doesn't
318 * @throws IOException if the specified file has no associated
322 * method denies read access to the file, or its {@link
324 * the permission to print the file, or the calling thread is not
327 public void print(File file) throws IOException {
334 checkFileValidation(file);
336 peer.print(file);