src/java.base/share/classes/java/io/FilterWriter.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 47216 71c04702a3d5
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    26 package java.io;
    26 package java.io;
    27 
    27 
    28 
    28 
    29 /**
    29 /**
    30  * Abstract class for writing filtered character streams.
    30  * Abstract class for writing filtered character streams.
    31  * The abstract class <code>FilterWriter</code> itself
    31  * The abstract class {@code FilterWriter} itself
    32  * provides default methods that pass all requests to the
    32  * provides default methods that pass all requests to the
    33  * contained stream. Subclasses of <code>FilterWriter</code>
    33  * contained stream. Subclasses of {@code FilterWriter}
    34  * should override some of these methods and may also
    34  * should override some of these methods and may also
    35  * provide additional methods and fields.
    35  * provide additional methods and fields.
    36  *
    36  *
    37  * @author      Mark Reinhold
    37  * @author      Mark Reinhold
    38  * @since       1.1
    38  * @since       1.1
    47 
    47 
    48     /**
    48     /**
    49      * Create a new filtered writer.
    49      * Create a new filtered writer.
    50      *
    50      *
    51      * @param out  a Writer object to provide the underlying stream.
    51      * @param out  a Writer object to provide the underlying stream.
    52      * @throws NullPointerException if <code>out</code> is <code>null</code>
    52      * @throws NullPointerException if {@code out} is {@code null}
    53      */
    53      */
    54     protected FilterWriter(Writer out) {
    54     protected FilterWriter(Writer out) {
    55         super(out);
    55         super(out);
    56         this.out = out;
    56         this.out = out;
    57     }
    57     }
    58 
    58 
    59     /**
    59     /**
    60      * Writes a single character.
    60      * Writes a single character.
    61      *
    61      *
    62      * @exception  IOException  If an I/O error occurs
    62      * @throws     IOException  If an I/O error occurs
    63      */
    63      */
    64     public void write(int c) throws IOException {
    64     public void write(int c) throws IOException {
    65         out.write(c);
    65         out.write(c);
    66     }
    66     }
    67 
    67 
   102     }
   102     }
   103 
   103 
   104     /**
   104     /**
   105      * Flushes the stream.
   105      * Flushes the stream.
   106      *
   106      *
   107      * @exception  IOException  If an I/O error occurs
   107      * @throws     IOException  If an I/O error occurs
   108      */
   108      */
   109     public void flush() throws IOException {
   109     public void flush() throws IOException {
   110         out.flush();
   110         out.flush();
   111     }
   111     }
   112 
   112