summaryrefslogtreecommitdiff
path: root/libjava/java/io/FilterWriter.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-03-18 06:00:25 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-03-18 06:00:25 +0000
commitf4f5d1d62161cc99ecfc68495d501342aa1e61dc (patch)
tree9f83602fa5fd87c7741475487fab1b0b3a3e47ab /libjava/java/io/FilterWriter.java
parent61f1ed592c606d1d2ae272292ad4dbe37d71d78b (diff)
BufferedReader.java, [...]: Merged from classpath.
2003-03-18 Michael Koch <konqueror@gmx.de> * 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
Diffstat (limited to 'libjava/java/io/FilterWriter.java')
-rw-r--r--libjava/java/io/FilterWriter.java232
1 files changed, 112 insertions, 120 deletions
diff --git a/libjava/java/io/FilterWriter.java b/libjava/java/io/FilterWriter.java
index f94d9955a3d..f476dfee3f5 100644
--- a/libjava/java/io/FilterWriter.java
+++ b/libjava/java/io/FilterWriter.java
@@ -1,5 +1,5 @@
/* FilterWriter.java -- Parent class for output streams that filter
- Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,128 +52,120 @@ package java.io;
* underlying stream. Subclasses provide actual filtering.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
- * @author Tom Tromey <tromey@cygnus.com>
+ * @author Tom Tromey <tromey@cygnus.com>
*/
public abstract class FilterWriter extends Writer
{
-
-/*************************************************************************/
-
-/*
- * Instance Variables
- */
-
-/**
- * This is the subordinate <code>Writer</code> that this class
- * redirects its method calls to.
- */
-protected Writer out;
-
-/*************************************************************************/
-
-/*
- * Constructors
- */
-
-/**
- * This method initializes an instance of <code>FilterWriter</code>
- * to write to the specified subordinate <code>Writer</code>.
- * The given <code>Writer</code> will be used as <code>lock</code> for
- * the newly created <code>FilterWriter</code>.
- *
- * @param out The <code>Writer</code> to write to
- */
-protected
-FilterWriter(Writer out)
-{
- super(out);
- this.out = out;
-}
-
-/*************************************************************************/
-
-/*
- * Instance Methods
- */
-
-/**
- * This method closes the underlying <code>Writer</code>. Any
- * further attempts to write to this stream may throw an exception.
- *
- * @exception IOException If an error occurs
- */
-public void
-close() throws IOException
-{
- out.close();
-}
-
-/*************************************************************************/
-
-/**
- * This method attempt to flush all buffered output to be written to the
- * underlying output sink.
- *
- * @exception IOException If an error occurs
- */
-public void
-flush() throws IOException
-{
- out.flush();
-}
-
-/*************************************************************************/
-
-/**
- * This method writes a single char of output to the underlying
- * <code>Writer</code>.
- *
- * @param b The char to write, passed as an int.
- *
- * @exception IOException If an error occurs
- */
-public void
-write(int b) throws IOException
-{
- out.write(b);
-}
-
-/*************************************************************************/
-
-/**
- * This method writes <code>len</code> chars from the array <code>buf</code>
- * starting at index <code>offset</code> to the underlying
- * <code>Writer</code>.
- *
- * @param buf The char array to write chars from
- * @param offset The index into the array to start writing chars from
- * @param len The number of chars to write
- *
- * @exception IOException If an error occurs
- */
-public void
-write(char[] buf, int offset, int len) throws IOException
-{
- out.write(buf, offset, len);
-}
-
-/*************************************************************************/
-
-/**
- * This method writes <code>len</code> chars from the <code>String</code>
- * starting at position <code>offset</code>.
- *
- * @param str The <code>String</code> that is to be written
- * @param offset The character offset into the <code>String</code> to start writing from
- * @param len The number of chars to write
- *
- * @exception IOException If an error occurs
- */
-public void
-write(String str, int offset, int len) throws IOException
-{
- out.write(str, offset, len);
-}
+ /*
+ * Instance Variables
+ */
+
+ /**
+ * This is the subordinate <code>Writer</code> that this class
+ * redirects its method calls to.
+ */
+ protected Writer out;
+
+ /*************************************************************************/
+
+ /*
+ * Constructors
+ */
+
+ /**
+ * This method initializes an instance of <code>FilterWriter</code>
+ * to write to the specified subordinate <code>Writer</code>.
+ * The given <code>Writer</code> will be used as <code>lock</code> for
+ * the newly created <code>FilterWriter</code>.
+ *
+ * @param out The <code>Writer</code> to write to
+ */
+ protected FilterWriter(Writer out)
+ {
+ super(out);
+ this.out = out;
+ }
+
+ /*************************************************************************/
+
+ /*
+ * Instance Methods
+ */
+
+ /**
+ * This method closes the underlying <code>Writer</code>. Any
+ * further attempts to write to this stream may throw an exception.
+ *
+ * @exception IOException If an error occurs
+ */
+ public void close() throws IOException
+ {
+ out.close();
+ }
+
+ /*************************************************************************/
+
+ /**
+ * This method attempt to flush all buffered output to be written to the
+ * underlying output sink.
+ *
+ * @exception IOException If an error occurs
+ */
+ public void flush() throws IOException
+ {
+ out.flush();
+ }
+
+ /*************************************************************************/
+
+ /**
+ * This method writes a single char of output to the underlying
+ * <code>Writer</code>.
+ *
+ * @param b The char to write, passed as an int.
+ *
+ * @exception IOException If an error occurs
+ */
+ public void write(int b) throws IOException
+ {
+ out.write(b);
+ }
+
+ /*************************************************************************/
+
+ /**
+ * This method writes <code>len</code> chars from the array <code>buf</code>
+ * starting at index <code>offset</code> to the underlying
+ * <code>Writer</code>.
+ *
+ * @param buf The char array to write chars from
+ * @param offset The index into the array to start writing chars from
+ * @param len The number of chars to write
+ *
+ * @exception IOException If an error occurs
+ */
+ public void write(char[] buf, int offset, int len) throws IOException
+ {
+ out.write(buf, offset, len);
+ }
+
+ /*************************************************************************/
+
+ /**
+ * This method writes <code>len</code> chars from the <code>String</code>
+ * starting at position <code>offset</code>.
+ *
+ * @param str The <code>String</code> that is to be written
+ * @param offset The character offset into the <code>String</code>
+ * to start writing from
+ * @param len The number of chars to write
+ *
+ * @exception IOException If an error occurs
+ */
+ public void write(String str, int offset, int len) throws IOException
+ {
+ out.write(str, offset, len);
+ }
} // class FilterWriter