From a21f23fc67acde9dc7708a0ac2ed06cbbdedf9cf Mon Sep 17 00:00:00 2001 From: Warren Levy Date: Thu, 10 Jun 1999 18:52:00 +0000 Subject: FileDescriptor.java (FileDescriptor(String, int)): Throw FileNotFoundException instead of IOException. 1999-06-10 Warren Levy * java/io/FileDescriptor.java (FileDescriptor(String, int)): Throw FileNotFoundException instead of IOException. (open): ditto. * java/io/FileInputStream.java (FileInputStream): Doesn't throw IOException. * java/text/Collator.java (CANONICAL_DECOMPOSITION): Fixed typo in static field name. From-SVN: r27473 --- libjava/java/io/FileDescriptor.java | 4 ++-- libjava/java/io/FileInputStream.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libjava/java/io') diff --git a/libjava/java/io/FileDescriptor.java b/libjava/java/io/FileDescriptor.java index 0782b0c..d345db2 100644 --- a/libjava/java/io/FileDescriptor.java +++ b/libjava/java/io/FileDescriptor.java @@ -42,7 +42,7 @@ public final class FileDescriptor static final int CUR = 1; // Open a file. MODE is a combination of the above mode flags. - FileDescriptor (String path, int mode) throws IOException + FileDescriptor (String path, int mode) throws FileNotFoundException { fd = open (path, mode); } @@ -52,7 +52,7 @@ public final class FileDescriptor fd = -1; } - native int open (String path, int mode) throws IOException; + native int open (String path, int mode) throws FileNotFoundException; native void write (int b) throws IOException; native void write (byte[] b, int offset, int len) throws IOException, NullPointerException, IndexOutOfBoundsException; diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java index 4f44dae..04ad6dd 100644 --- a/libjava/java/io/FileInputStream.java +++ b/libjava/java/io/FileInputStream.java @@ -23,7 +23,7 @@ public class FileInputStream extends InputStream /* Contains the file descriptor for referencing the actual file. */ private FileDescriptor fd; - public FileInputStream(String name) throws FileNotFoundException, IOException + public FileInputStream(String name) throws FileNotFoundException { SecurityManager s = System.getSecurityManager(); if (s != null) @@ -31,7 +31,7 @@ public class FileInputStream extends InputStream fd = new FileDescriptor(name, FileDescriptor.READ); } - public FileInputStream(File file) throws FileNotFoundException, IOException + public FileInputStream(File file) throws FileNotFoundException { this(file.getPath()); } -- cgit v1.1