13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.io;
27
28
29 /**
30 * Piped character-output streams.
31 *
32 * @author Mark Reinhold
33 * @since JDK1.1
34 */
35
36 public class PipedWriter extends Writer {
37
38 /* REMIND: identification of the read and write sides needs to be
39 more sophisticated. Either using thread groups (but what about
40 pipes within a thread?) or using finalization (but it may be a
41 long time until the next GC). */
42 private PipedReader sink;
43
44 /* This flag records the open status of this particular writer. It
45 * is independent of the status flags defined in PipedReader. It is
46 * used to do a sanity check on connect.
47 */
48 private boolean closed = false;
49
50 /**
51 * Creates a piped writer connected to the specified piped
52 * reader. Data characters written to this stream will then be
53 * available as input from <code>snk</code>.
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.io;
27
28
29 /**
30 * Piped character-output streams.
31 *
32 * @author Mark Reinhold
33 * @since 1.1
34 */
35
36 public class PipedWriter extends Writer {
37
38 /* REMIND: identification of the read and write sides needs to be
39 more sophisticated. Either using thread groups (but what about
40 pipes within a thread?) or using finalization (but it may be a
41 long time until the next GC). */
42 private PipedReader sink;
43
44 /* This flag records the open status of this particular writer. It
45 * is independent of the status flags defined in PipedReader. It is
46 * used to do a sanity check on connect.
47 */
48 private boolean closed = false;
49
50 /**
51 * Creates a piped writer connected to the specified piped
52 * reader. Data characters written to this stream will then be
53 * available as input from <code>snk</code>.
|