< prev index next >

src/java.base/share/classes/java/io/PipedOutputStream.java

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea

*** 1,7 **** /* ! * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 56,66 **** * Creates a piped output stream connected to the specified piped * input stream. Data bytes written to this stream will then be * available as input from <code>snk</code>. * * @param snk The piped input stream to connect to. ! * @exception IOException if an I/O error occurs. */ public PipedOutputStream(PipedInputStream snk) throws IOException { connect(snk); } --- 56,66 ---- * Creates a piped output stream connected to the specified piped * input stream. Data bytes written to this stream will then be * available as input from <code>snk</code>. * * @param snk The piped input stream to connect to. ! * @throws IOException if an I/O error occurs. */ public PipedOutputStream(PipedInputStream snk) throws IOException { connect(snk); }
*** 89,99 **** * <blockquote><pre> * snk.connect(src)</pre></blockquote> * The two calls have the same effect. * * @param snk the piped input stream to connect to. ! * @exception IOException if an I/O error occurs. */ public synchronized void connect(PipedInputStream snk) throws IOException { if (snk == null) { throw new NullPointerException(); } else if (sink != null || snk.connected) { --- 89,99 ---- * <blockquote><pre> * snk.connect(src)</pre></blockquote> * The two calls have the same effect. * * @param snk the piped input stream to connect to. ! * @throws IOException if an I/O error occurs. */ public synchronized void connect(PipedInputStream snk) throws IOException { if (snk == null) { throw new NullPointerException(); } else if (sink != null || snk.connected) {
*** 109,119 **** * Writes the specified <code>byte</code> to the piped output stream. * <p> * Implements the <code>write</code> method of <code>OutputStream</code>. * * @param b the <code>byte</code> to be written. ! * @exception IOException if the pipe is <a href=#BROKEN> broken</a>, * {@link #connect(java.io.PipedInputStream) unconnected}, * closed, or if an I/O error occurs. */ public void write(int b) throws IOException { if (sink == null) { --- 109,119 ---- * Writes the specified <code>byte</code> to the piped output stream. * <p> * Implements the <code>write</code> method of <code>OutputStream</code>. * * @param b the <code>byte</code> to be written. ! * @throws IOException if the pipe is <a href=#BROKEN> broken</a>, * {@link #connect(java.io.PipedInputStream) unconnected}, * closed, or if an I/O error occurs. */ public void write(int b) throws IOException { if (sink == null) {
*** 129,139 **** * stream. * * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. ! * @exception IOException if the pipe is <a href=#BROKEN> broken</a>, * {@link #connect(java.io.PipedInputStream) unconnected}, * closed, or if an I/O error occurs. */ public void write(byte b[], int off, int len) throws IOException { if (sink == null) { --- 129,139 ---- * stream. * * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. ! * @throws IOException if the pipe is <a href=#BROKEN> broken</a>, * {@link #connect(java.io.PipedInputStream) unconnected}, * closed, or if an I/O error occurs. */ public void write(byte b[], int off, int len) throws IOException { if (sink == null) {
*** 152,162 **** /** * Flushes this output stream and forces any buffered output bytes * to be written out. * This will notify any readers that bytes are waiting in the pipe. * ! * @exception IOException if an I/O error occurs. */ public synchronized void flush() throws IOException { if (sink != null) { synchronized (sink) { sink.notifyAll(); --- 152,162 ---- /** * Flushes this output stream and forces any buffered output bytes * to be written out. * This will notify any readers that bytes are waiting in the pipe. * ! * @throws IOException if an I/O error occurs. */ public synchronized void flush() throws IOException { if (sink != null) { synchronized (sink) { sink.notifyAll();
*** 167,177 **** /** * Closes this piped output stream and releases any system resources * associated with this stream. This stream may no longer be used for * writing bytes. * ! * @exception IOException if an I/O error occurs. */ public void close() throws IOException { if (sink != null) { sink.receivedLast(); } --- 167,177 ---- /** * Closes this piped output stream and releases any system resources * associated with this stream. This stream may no longer be used for * writing bytes. * ! * @throws IOException if an I/O error occurs. */ public void close() throws IOException { if (sink != null) { sink.receivedLast(); }
< prev index next >