Name: rlT66838 Date: 07/18/97
The constructor for the FileOutputStream declares that it can
throw an IOException. This is not accurate, as the code clearly
shows - the IOException is caught, and a FileNotFoundException
is thrown:
public FileOutputStream(String name, boolean append) throws IOException {
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkWrite(name);
}
try {
fd = new FileDescriptor();
if(append)
openAppend(name);
else
open(name);
} catch (IOException e) {
throw new FileNotFoundException(name);
}
}
This should be a quick and easy fix - please do so!
company - PointCast, Inc. , email - ###@###.###
======================================================================
- duplicates
-
JDK-4049971 (docs) java.io.FileOutputStream append parameter and mode not described
-
- Closed
-
- relates to
-
JDK-4186358 java.io.FileOutputStream(File),RandomAccessFile(File,boolean): Incorrect throws
-
- Resolved
-
-
JDK-4106518 java.io.FileOutputStream ctors throw FileNotFoundException for read-only files
-
- Closed
-
-
JDK-4196065 (spec) FileOutputStream(File) missing "@throws IOException"
-
- Closed
-
-
JDK-4198210 java.util.jar.JarFile.JarFile ctors don't throw FileNotFoundException
-
- Closed
-