< prev index next >

src/java.base/share/classes/java/io/BufferedInputStream.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

@@ -190,11 +190,11 @@
      * buffer array of length  <code>size</code>
      * is created and stored in <code>buf</code>.
      *
      * @param   in     the underlying input stream.
      * @param   size   the buffer size.
-     * @exception IllegalArgumentException if {@code size <= 0}.
+     * @throws  IllegalArgumentException if {@code size <= 0}.
      */
     public BufferedInputStream(InputStream in, int size) {
         super(in);
         if (size <= 0) {
             throw new IllegalArgumentException("Buffer size <= 0");

@@ -252,11 +252,11 @@
      * the general contract of the <code>read</code>
      * method of <code>InputStream</code>.
      *
      * @return     the next byte of data, or <code>-1</code> if the end of the
      *             stream is reached.
-     * @exception  IOException  if this input stream has been closed by
+     * @throws     IOException  if this input stream has been closed by
      *                          invoking its {@link #close()} method,
      *                          or an I/O error occurs.
      * @see        java.io.FilterInputStream#in
      */
     public synchronized int read() throws IOException {

@@ -323,11 +323,11 @@
      * @param      b     destination buffer.
      * @param      off   offset at which to start storing bytes.
      * @param      len   maximum number of bytes to read.
      * @return     the number of bytes read, or <code>-1</code> if the end of
      *             the stream has been reached.
-     * @exception  IOException  if this input stream has been closed by
+     * @throws     IOException  if this input stream has been closed by
      *                          invoking its {@link #close()} method,
      *                          or an I/O error occurs.
      */
     public synchronized int read(byte b[], int off, int len)
         throws IOException

@@ -398,11 +398,11 @@
      * the buffer (<code>count&nbsp;- pos</code>) and the result of calling the
      * {@link java.io.FilterInputStream#in in}.available().
      *
      * @return     an estimate of the number of bytes that can be read (or skipped
      *             over) from this input stream without blocking.
-     * @exception  IOException  if this input stream has been closed by
+     * @throws     IOException  if this input stream has been closed by
      *                          invoking its {@link #close()} method,
      *                          or an I/O error occurs.
      */
     public synchronized int available() throws IOException {
         int n = count - pos;

@@ -433,11 +433,11 @@
      * (no mark has been set or the mark has been
      * invalidated), an <code>IOException</code>
      * is thrown. Otherwise, <code>pos</code> is
      * set equal to <code>markpos</code>.
      *
-     * @exception  IOException  if this stream has not been marked or,
+     * @throws     IOException  if this stream has not been marked or,
      *                  if the mark has been invalidated, or the stream
      *                  has been closed by invoking its {@link #close()}
      *                  method, or an I/O error occurs.
      * @see        java.io.BufferedInputStream#mark(int)
      */

@@ -468,11 +468,11 @@
      * associated with the stream.
      * Once the stream has been closed, further read(), available(), reset(),
      * or skip() invocations will throw an IOException.
      * Closing a previously closed stream has no effect.
      *
-     * @exception  IOException  if an I/O error occurs.
+     * @throws     IOException  if an I/O error occurs.
      */
     public void close() throws IOException {
         byte[] buffer;
         while ( (buffer = buf) != null) {
             if (U.compareAndSetReference(this, BUF_OFFSET, buffer, null)) {
< prev index next >