From f4f5d1d62161cc99ecfc68495d501342aa1e61dc Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 18 Mar 2003 06:00:25 +0000 Subject: BufferedReader.java, [...]: Merged from classpath. 2003-03-18 Michael Koch * java/io/BufferedReader.java, java/io/BufferedWriter.java, java/io/ByteArrayOutputStream.java, java/io/FileFilter.java, java/io/FilePermission.java, java/io/FileReader.java, java/io/FileWriter.java, java/io/FilenameFilter.java, java/io/FilterInputStream.java, java/io/FilterOutputStream.java, java/io/FilterReader.java, java/io/FilterWriter.java, java/io/ObjectInput.java, java/io/ObjectInputValidation.java, java/io/ObjectOutput.java, java/io/ObjectStreamField.java, java/io/PipedInputStream.java, java/io/PipedReader.java, java/io/PrintWriter.java, java/io/PushbackReader.java, java/io/Reader.java, java/io/SerializablePermission.java, java/io/StringReader.java, java/io/Writer.java: Merged from classpath. From-SVN: r64525 --- libjava/java/io/FileWriter.java | 154 ++++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 78 deletions(-) (limited to 'libjava/java/io/FileWriter.java') diff --git a/libjava/java/io/FileWriter.java b/libjava/java/io/FileWriter.java index 265f31cce64..5217f9ecc33 100644 --- a/libjava/java/io/FileWriter.java +++ b/libjava/java/io/FileWriter.java @@ -54,84 +54,82 @@ package java.io; public class FileWriter extends OutputStreamWriter { -/*************************************************************************/ - -/* - * Constructors - */ - -/** - * This method initializes a new FileWriter object to write - * to the specified File object. - * - * @param file The File object to write to. - * - * @param SecurityException If writing to this file is forbidden by the - * SecurityManager. - * @param IOException If any other error occurs - */ -public -FileWriter(File file) throws SecurityException, IOException -{ - super(new FileOutputStream(file)); -} - -/*************************************************************************/ - -/** - * This method initializes a new FileWriter object to write - * to the specified FileDescriptor object. - * - * @param fd The FileDescriptor object to write to - * - * @param SecurityException If writing to this file is forbidden by the - * SecurityManager. - */ -public -FileWriter(FileDescriptor fd) throws SecurityException -{ - super(new FileOutputStream(fd)); -} - -/*************************************************************************/ - -/** - * This method intializes a new FileWriter object to write to the - * specified named file. - * - * @param name The name of the file to write to - * - * @param SecurityException If writing to this file is forbidden by the - * SecurityManager. - * @param IOException If any other error occurs - */ -public -FileWriter(String name) throws IOException -{ - super(new FileOutputStream(name)); -} - -/*************************************************************************/ - -/** - * This method intializes a new FileWriter object to write to the - * specified named file. This form of the constructor allows the caller - * to determin whether data should be written starting at the beginning or - * the end of the file. - * - * @param name The name of the file to write to - * @param append true to start adding data at the end of the - * file, false otherwise. - * - * @param SecurityException If writing to this file is forbidden by the - * SecurityManager. - * @param IOException If any other error occurs - */ -public -FileWriter(String name, boolean append) throws IOException -{ - super(new FileOutputStream(name, append)); -} + /*************************************************************************/ + + /* + * Constructors + */ + + /** + * This method initializes a new FileWriter object to write + * to the specified File object. + * + * @param file The File object to write to. + * + * @param SecurityException If writing to this file is forbidden by the + * SecurityManager. + * @param IOException If any other error occurs + */ + public FileWriter(File file) throws SecurityException, IOException + { + super(new FileOutputStream(file)); + } + + /*************************************************************************/ + + /** + * This method initializes a new FileWriter object to write + * to the specified FileDescriptor object. + * + * @param fd The FileDescriptor object to write to + * + * @param SecurityException If writing to this file is forbidden by the + * SecurityManager. + */ + public FileWriter(FileDescriptor fd) throws SecurityException + { + super(new FileOutputStream(fd)); + } + + /*************************************************************************/ + + /** + * This method intializes a new FileWriter object to + * write to the + * specified named file. + * + * @param name The name of the file to write to + * + * @param SecurityException If writing to this file is forbidden by the + * SecurityManager. + * @param IOException If any other error occurs + */ + public FileWriter(String name) throws IOException + { + super(new FileOutputStream(name)); + } + + /*************************************************************************/ + + /** + * This method intializes a new FileWriter object to + * write to the + * specified named file. This form of the constructor allows the caller + * to determin whether data should be written starting at the beginning or + * the end of the file. + * + * @param name The name of the file to write to + * @param append true to start adding data at the end of the + * file, false otherwise. + * + * @param SecurityException If writing to this file is forbidden by the + * SecurityManager. + * @param IOException If any other error occurs + */ + public FileWriter(String name, boolean append) throws IOException + { + super(new FileOutputStream(name, append)); + } } // class FileWriter -- cgit v1.2.3