8230648: Replace @exception tag with @throws in java.base

Minor coding style update of javadoc tag in any file in java.base

Reviewed-by: prappo, lancea
This commit is contained in:
Julia Boes 2019-09-20 11:07:52 +01:00
parent 2fc6c6459d
commit b15b322cf3
196 changed files with 1959 additions and 1962 deletions

View file

@ -192,7 +192,7 @@ class BufferedInputStream extends FilterInputStream {
*
* @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);
@ -254,7 +254,7 @@ class BufferedInputStream extends FilterInputStream {
*
* @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
@ -325,7 +325,7 @@ class BufferedInputStream extends FilterInputStream {
* @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.
*/
@ -400,7 +400,7 @@ class BufferedInputStream extends FilterInputStream {
*
* @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.
*/
@ -435,7 +435,7 @@ class BufferedInputStream extends FilterInputStream {
* 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.
@ -470,7 +470,7 @@ class BufferedInputStream extends FilterInputStream {
* 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;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -65,7 +65,7 @@ public class BufferedOutputStream extends FilterOutputStream {
*
* @param out the underlying output stream.
* @param size the buffer size.
* @exception IllegalArgumentException if size &lt;= 0.
* @throws IllegalArgumentException if size &lt;= 0.
*/
public BufferedOutputStream(OutputStream out, int size) {
super(out);
@ -87,7 +87,7 @@ public class BufferedOutputStream extends FilterOutputStream {
* Writes the specified byte to this buffered output stream.
*
* @param b the byte to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
@Override
public synchronized void write(int b) throws IOException {
@ -111,7 +111,7 @@ public class BufferedOutputStream extends FilterOutputStream {
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
@Override
public synchronized void write(byte b[], int off, int len) throws IOException {
@ -134,7 +134,7 @@ public class BufferedOutputStream extends FilterOutputStream {
* Flushes this buffered output stream. This forces any buffered
* output bytes to be written out to the underlying output stream.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@Override

View file

@ -95,7 +95,7 @@ public class BufferedReader extends Reader {
* @param in A Reader
* @param sz Input-buffer size
*
* @exception IllegalArgumentException If {@code sz <= 0}
* @throws IllegalArgumentException If {@code sz <= 0}
*/
public BufferedReader(Reader in, int sz) {
super(in);
@ -172,7 +172,7 @@ public class BufferedReader extends Reader {
* @return The character read, as an integer in the range
* 0 to 65535 ({@code 0x00-0xffff}), or -1 if the
* end of the stream has been reached
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read() throws IOException {
synchronized (lock) {
@ -271,8 +271,8 @@ public class BufferedReader extends Reader {
* @return The number of characters read, or -1 if the end of the
* stream has been reached
*
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public int read(char cbuf[], int off, int len) throws IOException {
synchronized (lock) {
@ -311,7 +311,7 @@ public class BufferedReader extends Reader {
*
* @see java.io.LineNumberReader#readLine()
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
String readLine(boolean ignoreLF, boolean[] term) throws IOException {
StringBuffer s = null;
@ -388,7 +388,7 @@ public class BufferedReader extends Reader {
* any line-termination characters, or null if the end of the
* stream has been reached without reading any characters
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*
* @see java.nio.file.Files#readAllLines
*/
@ -403,8 +403,8 @@ public class BufferedReader extends Reader {
*
* @return The number of characters actually skipped
*
* @exception IllegalArgumentException If <code>n</code> is negative.
* @exception IOException If an I/O error occurs
* @throws IllegalArgumentException If <code>n</code> is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {
if (n < 0L) {
@ -444,7 +444,7 @@ public class BufferedReader extends Reader {
* stream is ready if the buffer is not empty, or if the underlying
* character stream is ready.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public boolean ready() throws IOException {
synchronized (lock) {
@ -491,8 +491,8 @@ public class BufferedReader extends Reader {
* whose size is no smaller than limit.
* Therefore large values should be used with care.
*
* @exception IllegalArgumentException If {@code readAheadLimit < 0}
* @exception IOException If an I/O error occurs
* @throws IllegalArgumentException If {@code readAheadLimit < 0}
* @throws IOException If an I/O error occurs
*/
public void mark(int readAheadLimit) throws IOException {
if (readAheadLimit < 0) {
@ -509,7 +509,7 @@ public class BufferedReader extends Reader {
/**
* Resets the stream to the most recent mark.
*
* @exception IOException If the stream has never been marked,
* @throws IOException If the stream has never been marked,
* or if the mark has been invalidated
*/
public void reset() throws IOException {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -89,7 +89,7 @@ public class BufferedWriter extends Writer {
* @param out A Writer
* @param sz Output-buffer size, a positive integer
*
* @exception IllegalArgumentException If {@code sz <= 0}
* @throws IllegalArgumentException If {@code sz <= 0}
*/
public BufferedWriter(Writer out, int sz) {
super(out);
@ -125,7 +125,7 @@ public class BufferedWriter extends Writer {
/**
* Writes a single character.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void write(int c) throws IOException {
synchronized (lock) {
@ -240,7 +240,7 @@ public class BufferedWriter extends Writer {
* system property {@code line.separator}, and is not necessarily a single
* newline ('\n') character.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void newLine() throws IOException {
write(System.lineSeparator());
@ -249,7 +249,7 @@ public class BufferedWriter extends Writer {
/**
* Flushes the stream.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void flush() throws IOException {
synchronized (lock) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -95,7 +95,7 @@ public class CharArrayReader extends Reader {
/**
* Reads a single character.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read() throws IOException {
synchronized (lock) {
@ -109,14 +109,14 @@ public class CharArrayReader extends Reader {
/**
* Reads characters into a portion of an array.
* @param b Destination buffer
* @param off Offset at which to start storing characters
* @param len Maximum number of characters to read
* @param b Destination buffer
* @param off Offset at which to start storing characters
* @param len Maximum number of characters to read
* @return The actual number of characters read, or -1 if
* the end of the stream has been reached
*
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public int read(char b[], int off, int len) throws IOException {
synchronized (lock) {
@ -153,9 +153,9 @@ public class CharArrayReader extends Reader {
* an exception in this case. If <code>n</code> is negative, then
* this method does nothing and returns <code>0</code>.
*
* @param n The number of characters to skip
* @return The number of characters actually skipped
* @exception IOException If the stream is closed, or an I/O error occurs
* @param n The number of characters to skip
* @return The number of characters actually skipped
* @throws IOException If the stream is closed, or an I/O error occurs
*/
public long skip(long n) throws IOException {
synchronized (lock) {
@ -177,7 +177,7 @@ public class CharArrayReader extends Reader {
* Tells whether this stream is ready to be read. Character-array readers
* are always ready to be read.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public boolean ready() throws IOException {
synchronized (lock) {
@ -203,7 +203,7 @@ public class CharArrayReader extends Reader {
* there is no actual limit; hence this argument is
* ignored.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void mark(int readAheadLimit) throws IOException {
synchronized (lock) {
@ -216,7 +216,7 @@ public class CharArrayReader extends Reader {
* Resets the stream to the most recent mark, or to the beginning if it has
* never been marked.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void reset() throws IOException {
synchronized (lock) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -61,8 +61,8 @@ class CharArrayWriter extends Writer {
/**
* Creates a new CharArrayWriter with the specified initial size.
*
* @param initialSize an int specifying the initial buffer size.
* @exception IllegalArgumentException if initialSize is negative
* @param initialSize an int specifying the initial buffer size.
* @throws IllegalArgumentException if initialSize is negative
*/
public CharArrayWriter(int initialSize) {
if (initialSize < 0) {

View file

@ -268,7 +268,7 @@ interface DataInput {
*
* @param n the number of bytes to be skipped.
* @return the number of bytes actually skipped.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
int skipBytes(int n) throws IOException;
@ -281,9 +281,9 @@ interface DataInput {
* method of interface {@code DataOutput}.
*
* @return the {@code boolean} value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
boolean readBoolean() throws IOException;
@ -297,9 +297,9 @@ interface DataInput {
* method of interface {@code DataOutput}.
*
* @return the 8-bit value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
byte readByte() throws IOException;
@ -317,9 +317,9 @@ interface DataInput {
* {@code 0} through {@code 255}.
*
* @return the unsigned 8-bit value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
int readUnsignedByte() throws IOException;
@ -338,9 +338,9 @@ interface DataInput {
* interface {@code DataOutput}.
*
* @return the 16-bit value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
short readShort() throws IOException;
@ -361,9 +361,9 @@ interface DataInput {
* {@code 0} through {@code 65535}.
*
* @return the unsigned 16-bit value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
int readUnsignedShort() throws IOException;
@ -381,9 +381,9 @@ interface DataInput {
* {@code DataOutput}.
*
* @return the {@code char} value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
char readChar() throws IOException;
@ -400,9 +400,9 @@ interface DataInput {
* method of interface {@code DataOutput}.
*
* @return the {@code int} value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
int readInt() throws IOException;
@ -427,9 +427,9 @@ interface DataInput {
* method of interface {@code DataOutput}.
*
* @return the {@code long} value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
long readLong() throws IOException;
@ -447,9 +447,9 @@ interface DataInput {
* method of interface {@code DataOutput}.
*
* @return the {@code float} value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
float readFloat() throws IOException;
@ -467,9 +467,9 @@ interface DataInput {
* method of interface {@code DataOutput}.
*
* @return the {@code double} value read.
* @exception EOFException if this stream reaches the end before reading
* @throws EOFException if this stream reaches the end before reading
* all the bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
double readDouble() throws IOException;
@ -510,7 +510,7 @@ interface DataInput {
* @return the next line of text from the input stream,
* or {@code null} if the end of file is
* encountered before a byte can be read.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
String readLine() throws IOException;
@ -593,10 +593,10 @@ interface DataInput {
* may be used to write data that is suitable
* for reading by this method.
* @return a Unicode string.
* @exception EOFException if this stream reaches the end
* @throws EOFException if this stream reaches the end
* before reading all the bytes.
* @exception IOException if an I/O error occurs.
* @exception UTFDataFormatException if the bytes do not represent a
* @throws IOException if an I/O error occurs.
* @throws UTFDataFormatException if the bytes do not represent a
* valid modified UTF-8 encoding of a string.
*/
String readUTF() throws IOException;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -89,10 +89,10 @@ class DataInputStream extends FilterInputStream implements DataInput {
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end
* of the stream has been reached.
* @exception IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
* input stream does not support reading after close, or another I/O
* error occurs.
* @throws IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
* input stream does not support reading after close, or another I/O
* error occurs.
* @see java.io.FilterInputStream#in
* @see java.io.InputStream#read(byte[], int, int)
*/
@ -129,19 +129,19 @@ class DataInputStream extends FilterInputStream implements DataInput {
* <code>b[b.length-1]</code> are unaffected.
*
* @param b the buffer into which the data is read.
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array <code>b</code>
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end
* of the stream has been reached.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @exception IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
* input stream does not support reading after close, or another I/O
* error occurs.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
* input stream does not support reading after close, or another I/O
* error occurs.
* @see java.io.FilterInputStream#in
* @see java.io.InputStream#read(byte[], int, int)
*/
@ -181,13 +181,13 @@ class DataInputStream extends FilterInputStream implements DataInput {
* @param b the buffer into which the data is read.
* @param off the start offset in the data array {@code b}.
* @param len the number of bytes to read.
* @exception NullPointerException if {@code b} is {@code null}.
* @exception IndexOutOfBoundsException if {@code off} is negative,
* @throws NullPointerException if {@code b} is {@code null}.
* @throws IndexOutOfBoundsException if {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading all the bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -213,7 +213,7 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @param n the number of bytes to be skipped.
* @return the actual number of bytes skipped.
* @exception IOException if the contained input stream does not support
* @throws IOException if the contained input stream does not support
* seek, or the stream has been closed and
* the contained input stream does not support
* reading after close, or another I/O error occurs.
@ -237,8 +237,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
* input stream.
*
* @return the <code>boolean</code> value read.
* @exception EOFException if this input stream has reached the end.
* @exception IOException the stream has been closed and the contained
* @throws EOFException if this input stream has reached the end.
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -260,8 +260,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next byte of this input stream as a signed 8-bit
* <code>byte</code>.
* @exception EOFException if this input stream has reached the end.
* @exception IOException the stream has been closed and the contained
* @throws EOFException if this input stream has reached the end.
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -283,8 +283,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next byte of this input stream, interpreted as an
* unsigned 8-bit number.
* @exception EOFException if this input stream has reached the end.
* @exception IOException the stream has been closed and the contained
* @throws EOFException if this input stream has reached the end.
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -306,9 +306,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next two bytes of this input stream, interpreted as a
* signed 16-bit number.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading two bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -331,9 +331,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next two bytes of this input stream, interpreted as an
* unsigned 16-bit integer.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading two bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -356,9 +356,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next two bytes of this input stream, interpreted as a
* <code>char</code>.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading two bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -381,9 +381,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next four bytes of this input stream, interpreted as an
* <code>int</code>.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading four bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -410,9 +410,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next eight bytes of this input stream, interpreted as a
* <code>long</code>.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading eight bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.FilterInputStream#in
@ -439,9 +439,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next four bytes of this input stream, interpreted as a
* <code>float</code>.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading four bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.DataInputStream#readInt()
@ -461,9 +461,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @return the next eight bytes of this input stream, interpreted as a
* <code>double</code>.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading eight bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @see java.io.DataInputStream#readLong()
@ -498,7 +498,7 @@ class DataInputStream extends FilterInputStream implements DataInput {
* </pre></blockquote>
*
* @return the next line of text from this input stream.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.BufferedReader#readLine()
* @see java.io.FilterInputStream#in
*/
@ -556,12 +556,12 @@ loop: while (true) {
* input stream.
*
* @return a Unicode string.
* @exception EOFException if this input stream reaches the end before
* @throws EOFException if this input stream reaches the end before
* reading all the bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @exception UTFDataFormatException if the bytes do not represent a valid
* @throws UTFDataFormatException if the bytes do not represent a valid
* modified UTF-8 encoding of a string.
* @see java.io.DataInputStream#readUTF(java.io.DataInput)
*/
@ -581,12 +581,12 @@ loop: while (true) {
*
* @param in a data input stream.
* @return a Unicode string.
* @exception EOFException if the input stream reaches the end
* @throws EOFException if the input stream reaches the end
* before all the bytes.
* @exception IOException the stream has been closed and the contained
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
* another I/O error occurs.
* @exception UTFDataFormatException if the bytes do not represent a
* @throws UTFDataFormatException if the bytes do not represent a
* valid modified UTF-8 encoding of a Unicode string.
* @see java.io.DataInputStream#readUnsignedShort()
*/

View file

@ -81,7 +81,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* Implements the <code>write</code> method of <code>OutputStream</code>.
*
* @param b the <code>byte</code> to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public synchronized void write(int b) throws IOException {
@ -98,7 +98,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public synchronized void write(byte b[], int off, int len)
@ -115,7 +115,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* The <code>flush</code> method of <code>DataOutputStream</code>
* calls the <code>flush</code> method of its underlying output stream.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
* @see java.io.OutputStream#flush()
*/
@ -132,7 +132,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* <code>1</code>.
*
* @param v a <code>boolean</code> value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public final void writeBoolean(boolean v) throws IOException {
@ -146,7 +146,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* <code>written</code> is incremented by <code>1</code>.
*
* @param v a <code>byte</code> value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public final void writeByte(int v) throws IOException {
@ -160,7 +160,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* <code>written</code> is incremented by <code>2</code>.
*
* @param v a <code>short</code> to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public final void writeShort(int v) throws IOException {
@ -175,7 +175,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* counter <code>written</code> is incremented by <code>2</code>.
*
* @param v a <code>char</code> value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public final void writeChar(int v) throws IOException {
@ -190,7 +190,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* <code>written</code> is incremented by <code>4</code>.
*
* @param v an <code>int</code> to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public final void writeInt(int v) throws IOException {
@ -209,7 +209,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* <code>written</code> is incremented by <code>8</code>.
*
* @param v a <code>long</code> to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public final void writeLong(long v) throws IOException {
@ -234,7 +234,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* incremented by <code>4</code>.
*
* @param v a <code>float</code> value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
* @see java.lang.Float#floatToIntBits(float)
*/
@ -251,7 +251,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* incremented by <code>8</code>.
*
* @param v a <code>double</code> value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
* @see java.lang.Double#doubleToLongBits(double)
*/
@ -267,7 +267,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* length of <code>s</code>.
*
* @param s a string of bytes to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
public final void writeBytes(String s) throws IOException {
@ -286,7 +286,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* the length of <code>s</code>.
*
* @param s a <code>String</code> value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.DataOutputStream#writeChar(int)
* @see java.io.FilterOutputStream#out
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -76,8 +76,8 @@ public interface Externalizable extends java.io.Serializable {
* relate the element to a public/protected field and/or
* method of this Externalizable class.
*
* @param out the stream to write the object to
* @exception IOException Includes any I/O exceptions that may occur
* @param out the stream to write the object to
* @throws IOException Includes any I/O exceptions that may occur
*/
void writeExternal(ObjectOutput out) throws IOException;
@ -88,10 +88,10 @@ public interface Externalizable extends java.io.Serializable {
* readExternal method must read the values in the same sequence
* and with the same types as were written by writeExternal.
*
* @param in the stream to read data from in order to restore the object
* @exception IOException if I/O errors occur
* @exception ClassNotFoundException If the class for an object being
* restored cannot be found.
* @param in the stream to read data from in order to restore the object
* @throws IOException if I/O errors occur
* @throws ClassNotFoundException If the class for an object being
* restored cannot be found.
*/
void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -199,7 +199,7 @@ public final class FileDescriptor {
* be flushed into the FileDescriptor (for example, by invoking
* OutputStream.flush) before that data will be affected by sync.
*
* @exception SyncFailedException
* @throws SyncFailedException
* Thrown when the buffers cannot be flushed,
* or because the system cannot guarantee that all the
* buffers have been synchronized with physical media.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -97,13 +97,13 @@ class FileInputStream extends InputStream
* <code>FileNotFoundException</code> is thrown.
*
* @param name the system-dependent file name.
* @exception FileNotFoundException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @exception SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access
* to the file.
* @throws FileNotFoundException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access
* to the file.
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
public FileInputStream(String name) throws FileNotFoundException {
@ -128,12 +128,12 @@ class FileInputStream extends InputStream
* <code>FileNotFoundException</code> is thrown.
*
* @param file the file to be opened for reading.
* @exception FileNotFoundException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @exception SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access to the file.
* @throws FileNotFoundException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@ -176,8 +176,8 @@ class FileInputStream extends InputStream
*
* @param fdObj the file descriptor to be opened for reading.
* @throws SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access to the
* file descriptor.
* <code>checkRead</code> method denies read access to the
* file descriptor.
* @see SecurityManager#checkRead(java.io.FileDescriptor)
*/
public FileInputStream(FileDescriptor fdObj) {
@ -219,7 +219,7 @@ class FileInputStream extends InputStream
*
* @return the next byte of data, or <code>-1</code> if the end of the
* file is reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public int read() throws IOException {
return read0();
@ -229,10 +229,10 @@ class FileInputStream extends InputStream
/**
* Reads a subarray as a sequence of bytes.
* @param b the data to be written
* @param off the start offset in the data
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
* @param b the data to be written
* @param off the start offset in the data
* @param len the number of bytes that are written
* @throws IOException If an I/O error has occurred.
*/
private native int readBytes(byte b[], int off, int len) throws IOException;
@ -245,7 +245,7 @@ class FileInputStream extends InputStream
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the file has been reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[]) throws IOException {
return readBytes(b, 0, b.length);
@ -263,11 +263,11 @@ class FileInputStream extends InputStream
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the file has been reached.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @exception IOException if an I/O error occurs.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[], int off, int len) throws IOException {
return readBytes(b, off, len);
@ -294,7 +294,7 @@ class FileInputStream extends InputStream
*
* @param n the number of bytes to be skipped.
* @return the actual number of bytes skipped.
* @exception IOException if n is negative, if the stream does not
* @throws IOException if n is negative, if the stream does not
* support seek, or if an I/O error occurs.
*/
public long skip(long n) throws IOException {
@ -317,7 +317,7 @@ class FileInputStream extends InputStream
*
* @return an estimate of the number of remaining bytes that can be read
* (or skipped over) from this input stream without blocking.
* @exception IOException if this file input stream has been closed by calling
* @throws IOException if this file input stream has been closed by calling
* {@code close} or an I/O error occurs.
*/
public int available() throws IOException {
@ -341,7 +341,7 @@ class FileInputStream extends InputStream
* If cleanup of native resources is needed, other mechanisms such as
* {@linkplain java.lang.ref.Cleaner} should be used.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*
* @revised 1.4
* @spec JSR-51
@ -378,7 +378,7 @@ class FileInputStream extends InputStream
* used by this <code>FileInputStream</code>.
*
* @return the file descriptor object associated with this stream.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FileDescriptor
*/
public final FileDescriptor getFD() throws IOException {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -112,10 +112,10 @@ class FileOutputStream extends OutputStream
* new FileOutputStream(name, false)}.
*
* @param name the system-dependent filename
* @exception FileNotFoundException if the file exists but is a directory
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* to the file.
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
@ -141,10 +141,10 @@ class FileOutputStream extends OutputStream
* @param name the system-dependent file name
* @param append if <code>true</code>, then bytes will be written
* to the end of the file rather than the beginning
* @exception FileNotFoundException if the file exists but is a directory
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* to the file.
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
@ -171,10 +171,10 @@ class FileOutputStream extends OutputStream
* reason then a <code>FileNotFoundException</code> is thrown.
*
* @param file the file to be opened for writing.
* @exception FileNotFoundException if the file exists but is a directory
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* to the file.
* @see java.io.File#getPath()
@ -203,10 +203,10 @@ class FileOutputStream extends OutputStream
* @param file the file to be opened for writing.
* @param append if <code>true</code>, then bytes will be written
* to the end of the file rather than the beginning
* @exception FileNotFoundException if the file exists but is a directory
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* to the file.
* @see java.io.File#getPath()
@ -254,7 +254,7 @@ class FileOutputStream extends OutputStream
* I/O on the stream, an <code>IOException</code> is thrown.
*
* @param fdObj the file descriptor to be opened for writing
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies
* write access to the file descriptor
* @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
@ -306,7 +306,7 @@ class FileOutputStream extends OutputStream
* the <code>write</code> method of <code>OutputStream</code>.
*
* @param b the byte to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void write(int b) throws IOException {
write(b, fdAccess.getAppend(fd));
@ -319,7 +319,7 @@ class FileOutputStream extends OutputStream
* @param len the number of bytes that are written
* @param append {@code true} to first advance the position to the
* end of file
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
private native void writeBytes(byte b[], int off, int len, boolean append)
throws IOException;
@ -329,7 +329,7 @@ class FileOutputStream extends OutputStream
* to this file output stream.
*
* @param b the data.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void write(byte b[]) throws IOException {
writeBytes(b, 0, b.length, fdAccess.getAppend(fd));
@ -342,7 +342,7 @@ class FileOutputStream extends OutputStream
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void write(byte b[], int off, int len) throws IOException {
writeBytes(b, off, len, fdAccess.getAppend(fd));
@ -364,7 +364,7 @@ class FileOutputStream extends OutputStream
* If cleanup of native resources is needed, other mechanisms such as
* {@linkplain java.lang.ref.Cleaner} should be used.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*
* @revised 1.4
* @spec JSR-51
@ -401,7 +401,7 @@ class FileOutputStream extends OutputStream
* the connection to the file in the file system being used
* by this <code>FileOutputStream</code> object.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FileDescriptor
*/
public final FileDescriptor getFD() throws IOException {

View file

@ -1127,10 +1127,10 @@ final class FilePermissionCollection extends PermissionCollection
*
* @param permission the Permission object to add.
*
* @exception IllegalArgumentException - if the permission is not a
* @throws IllegalArgumentException - if the permission is not a
* FilePermission
*
* @exception SecurityException - if this FilePermissionCollection object
* @throws SecurityException - if this FilePermissionCollection object
* has been marked readonly
*/
@Override

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -50,11 +50,11 @@ public class FileReader extends InputStreamReader {
* using the platform's
* {@linkplain java.nio.charset.Charset#defaultCharset() default charset}.
*
* @param fileName the name of the file to read
* @exception FileNotFoundException if the named file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @param fileName the name of the file to read
* @throws FileNotFoundException if the named file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
*/
public FileReader(String fileName) throws FileNotFoundException {
super(new FileInputStream(fileName));
@ -65,11 +65,11 @@ public class FileReader extends InputStreamReader {
* using the platform's
* {@linkplain java.nio.charset.Charset#defaultCharset() default charset}.
*
* @param file the {@code File} to read
* @exception FileNotFoundException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @param file the {@code File} to read
* @throws FileNotFoundException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
*/
public FileReader(File file) throws FileNotFoundException {
super(new FileInputStream(file));
@ -90,12 +90,12 @@ public class FileReader extends InputStreamReader {
* Creates a new {@code FileReader}, given the name of the file to read
* and the {@linkplain java.nio.charset.Charset charset}.
*
* @param fileName the name of the file to read
* @param charset the {@linkplain java.nio.charset.Charset charset}
* @exception IOException if the named file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @param fileName the name of the file to read
* @param charset the {@linkplain java.nio.charset.Charset charset}
* @throws IOException if the named file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
*
* @since 11
*/
@ -107,12 +107,12 @@ public class FileReader extends InputStreamReader {
* Creates a new {@code FileReader}, given the {@code File} to read and
* the {@linkplain java.nio.charset.Charset charset}.
*
* @param file the {@code File} to read
* @param charset the {@linkplain java.nio.charset.Charset charset}
* @exception IOException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
* @param file the {@code File} to read
* @param charset the {@linkplain java.nio.charset.Charset charset}
* @throws IOException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
* reading.
*
* @since 11
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -76,7 +76,7 @@ class FilterInputStream extends InputStream {
*
* @return the next byte of data, or <code>-1</code> if the end of the
* stream is reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
public int read() throws IOException {
@ -100,7 +100,7 @@ class FilterInputStream extends InputStream {
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the stream has been reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#read(byte[], int, int)
*/
public int read(byte b[]) throws IOException {
@ -122,11 +122,11 @@ class FilterInputStream extends InputStream {
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the stream has been reached.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @exception IOException if an I/O error occurs.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
public int read(byte b[], int off, int len) throws IOException {
@ -161,7 +161,7 @@ class FilterInputStream extends InputStream {
*
* @return an estimate of the number of bytes that can be read (or skipped
* over) from this input stream without blocking.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public int available() throws IOException {
return in.available();
@ -173,7 +173,7 @@ class FilterInputStream extends InputStream {
* This
* method simply performs <code>in.close()</code>.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
public void close() throws IOException {
@ -216,7 +216,7 @@ class FilterInputStream extends InputStream {
* If this happens within readlimit bytes, it allows the outer
* code to reset the stream and try another parser.
*
* @exception IOException if the stream has not been marked or if the
* @throws IOException if the stream has not been marked or if the
* mark has been invalidated.
* @see java.io.FilterInputStream#in
* @see java.io.FilterInputStream#mark(int)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -80,7 +80,7 @@ public class FilterOutputStream extends OutputStream {
* Implements the abstract {@code write} method of {@code OutputStream}.
*
* @param b the <code>byte</code>.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
@Override
public void write(int b) throws IOException {
@ -100,7 +100,7 @@ public class FilterOutputStream extends OutputStream {
* the single argument <code>b</code>.
*
* @param b the data to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#write(byte[], int, int)
*/
@Override
@ -125,7 +125,7 @@ public class FilterOutputStream extends OutputStream {
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#write(int)
*/
@Override
@ -145,7 +145,7 @@ public class FilterOutputStream extends OutputStream {
* The <code>flush</code> method of <code>FilterOutputStream</code>
* calls the <code>flush</code> method of its underlying output stream.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@Override
@ -161,7 +161,7 @@ public class FilterOutputStream extends OutputStream {
* FilterOutputStream} calls its {@code flush} method, and then
* calls the {@code close} method of its underlying output stream.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#flush()
* @see java.io.FilterOutputStream#out
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -59,7 +59,7 @@ public abstract class FilterReader extends Reader {
/**
* Reads a single character.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read() throws IOException {
return in.read();
@ -68,8 +68,8 @@ public abstract class FilterReader extends Reader {
/**
* Reads characters into a portion of an array.
*
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public int read(char cbuf[], int off, int len) throws IOException {
return in.read(cbuf, off, len);
@ -78,7 +78,7 @@ public abstract class FilterReader extends Reader {
/**
* Skips characters.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {
return in.skip(n);
@ -87,7 +87,7 @@ public abstract class FilterReader extends Reader {
/**
* Tells whether this stream is ready to be read.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public boolean ready() throws IOException {
return in.ready();
@ -103,7 +103,7 @@ public abstract class FilterReader extends Reader {
/**
* Marks the present position in the stream.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void mark(int readAheadLimit) throws IOException {
in.mark(readAheadLimit);
@ -112,7 +112,7 @@ public abstract class FilterReader extends Reader {
/**
* Resets the stream.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void reset() throws IOException {
in.reset();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -59,7 +59,7 @@ public abstract class FilterWriter extends Writer {
/**
* Writes a single character.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void write(int c) throws IOException {
out.write(c);
@ -104,7 +104,7 @@ public abstract class FilterWriter extends Writer {
/**
* Flushes the stream.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void flush() throws IOException {
out.flush();

View file

@ -177,7 +177,7 @@ public abstract class InputStream implements Closeable {
*
* @return the next byte of data, or <code>-1</code> if the end of the
* stream is reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public abstract int read() throws IOException;
@ -208,10 +208,10 @@ public abstract class InputStream implements Closeable {
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the stream has been reached.
* @exception IOException If the first byte cannot be read for any reason
* other than the end of the file, if the input stream has been closed, or
* if some other I/O error occurs.
* @exception NullPointerException if <code>b</code> is <code>null</code>.
* @throws IOException If the first byte cannot be read for any reason
* other than the end of the file, if the input stream has been
* closed, or if some other I/O error occurs.
* @throws NullPointerException if <code>b</code> is <code>null</code>.
* @see java.io.InputStream#read(byte[], int, int)
*/
public int read(byte b[]) throws IOException {
@ -266,13 +266,13 @@ public abstract class InputStream implements Closeable {
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the stream has been reached.
* @exception IOException If the first byte cannot be read for any reason
* other than end of file, or if the input stream has been closed, or if
* some other I/O error occurs.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws IOException If the first byte cannot be read for any reason
* other than end of file, or if the input stream has been closed,
* or if some other I/O error occurs.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @see java.io.InputStream#read()
*/
public int read(byte b[], int off, int len) throws IOException {
@ -634,7 +634,7 @@ public abstract class InputStream implements Closeable {
* @return an estimate of the number of bytes that can be read (or
* skipped over) from this input stream without blocking or
* {@code 0} when it reaches the end of the input stream.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public int available() throws IOException {
return 0;
@ -647,7 +647,7 @@ public abstract class InputStream implements Closeable {
* <p> The <code>close</code> method of <code>InputStream</code> does
* nothing.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void close() throws IOException {}
@ -718,8 +718,8 @@ public abstract class InputStream implements Closeable {
* <p>The method <code>reset</code> for class <code>InputStream</code>
* does nothing except throw an <code>IOException</code>.
*
* @exception IOException if this stream has not been marked or if the
* mark has been invalidated.
* @throws IOException if this stream has not been marked or if the
* mark has been invalidated.
* @see java.io.InputStream#mark(int)
* @see java.io.IOException
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -88,7 +88,7 @@ public class InputStreamReader extends Reader {
* The name of a supported
* {@link java.nio.charset.Charset charset}
*
* @exception UnsupportedEncodingException
* @throws UnsupportedEncodingException
* If the named charset is not supported
*/
public InputStreamReader(InputStream in, String charsetName)
@ -162,7 +162,7 @@ public class InputStreamReader extends Reader {
* @return The character read, or -1 if the end of the stream has been
* reached
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read() throws IOException {
return sd.read();
@ -178,8 +178,8 @@ public class InputStreamReader extends Reader {
* @return The number of characters read, or -1 if the end of the
* stream has been reached
*
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public int read(char cbuf[], int offset, int length) throws IOException {
return sd.read(cbuf, offset, length);
@ -190,7 +190,7 @@ public class InputStreamReader extends Reader {
* ready if its input buffer is not empty, or if bytes are available to be
* read from the underlying byte stream.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public boolean ready() throws IOException {
return sd.ready();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* 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
@ -83,7 +83,7 @@ class LineNumberInputStream extends FilterInputStream {
*
* @return the next byte of data, or {@code -1} if the end of this
* stream is reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
* @see java.io.LineNumberInputStream#getLineNumber()
*/
@ -124,7 +124,7 @@ class LineNumberInputStream extends FilterInputStream {
* @return the total number of bytes read into the buffer, or
* {@code -1} if there is no more data because the end of
* this stream has been reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.LineNumberInputStream#read()
*/
public int read(byte b[], int off, int len) throws IOException {
@ -173,7 +173,7 @@ class LineNumberInputStream extends FilterInputStream {
*
* @param n the number of bytes to be skipped.
* @return the actual number of bytes skipped.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
public long skip(long n) throws IOException {
@ -234,7 +234,7 @@ class LineNumberInputStream extends FilterInputStream {
*
* @return the number of bytes that can be read from this input stream
* without blocking.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
public int available() throws IOException {
@ -281,7 +281,7 @@ class LineNumberInputStream extends FilterInputStream {
* which, if it happens within readlimit bytes, allows the outer
* code to reset the stream and try another parser.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
* @see java.io.LineNumberInputStream#mark(int)
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -41,11 +41,11 @@ public interface ObjectInput extends DataInput, AutoCloseable {
* Read and return an object. The class that implements this interface
* defines where the object is "read" from.
*
* @return the object read from the stream
* @exception java.lang.ClassNotFoundException If the class of a serialized
* object cannot be found.
* @exception IOException If any of the usual Input/Output
* related exceptions occur.
* @return the object read from the stream
* @throws java.lang.ClassNotFoundException If the class of a serialized
* object cannot be found.
* @throws IOException If any of the usual Input/Output
* related exceptions occur.
*/
public Object readObject()
throws ClassNotFoundException, IOException;
@ -55,45 +55,45 @@ public interface ObjectInput extends DataInput, AutoCloseable {
* available.
* @return the byte read, or -1 if the end of the
* stream is reached.
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public int read() throws IOException;
/**
* Reads into an array of bytes. This method will
* block until some input is available.
* @param b the buffer into which the data is read
* @param b the buffer into which the data is read
* @return the actual number of bytes read, -1 is
* returned when the end of the stream is reached.
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public int read(byte b[]) throws IOException;
/**
* Reads into an array of bytes. This method will
* block until some input is available.
* @param b the buffer into which the data is read
* @param off the start offset of the data
* @param len the maximum number of bytes read
* @param b the buffer into which the data is read
* @param off the start offset of the data
* @param len the maximum number of bytes read
* @return the actual number of bytes read, -1 is
* returned when the end of the stream is reached.
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public int read(byte b[], int off, int len) throws IOException;
/**
* Skips n bytes of input.
* @param n the number of bytes to be skipped
* @param n the number of bytes to be skipped
* @return the actual number of bytes skipped.
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public long skip(long n) throws IOException;
/**
* Returns the number of bytes that can be read
* without blocking.
* @return the number of available bytes.
* @exception IOException If an I/O error has occurred.
* @return the number of available bytes.
* @throws IOException If an I/O error has occurred.
*/
public int available() throws IOException;
@ -101,7 +101,7 @@ public interface ObjectInput extends DataInput, AutoCloseable {
* Closes the input stream. Must be called
* to release any resources associated with
* the stream.
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public void close() throws IOException;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -39,7 +39,7 @@ public interface ObjectInputValidation {
/**
* Validates the object.
*
* @exception InvalidObjectException If the object cannot validate itself.
* @throws InvalidObjectException If the object cannot validate itself.
*/
public void validateObject() throws InvalidObjectException;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -42,8 +42,8 @@ public interface ObjectOutput extends DataOutput, AutoCloseable {
* class that implements this interface defines how the object is
* written.
*
* @param obj the object to be written
* @exception IOException Any of the usual Input/Output related exceptions.
* @param obj the object to be written
* @throws IOException Any of the usual Input/Output related exceptions.
*/
public void writeObject(Object obj)
throws IOException;
@ -51,32 +51,32 @@ public interface ObjectOutput extends DataOutput, AutoCloseable {
/**
* Writes a byte. This method will block until the byte is actually
* written.
* @param b the byte
* @exception IOException If an I/O error has occurred.
* @param b the byte
* @throws IOException If an I/O error has occurred.
*/
public void write(int b) throws IOException;
/**
* Writes an array of bytes. This method will block until the bytes
* are actually written.
* @param b the data to be written
* @exception IOException If an I/O error has occurred.
* @param b the data to be written
* @throws IOException If an I/O error has occurred.
*/
public void write(byte b[]) throws IOException;
/**
* Writes a sub array of bytes.
* @param b the data to be written
* @param off the start offset in the data
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
* @param b the data to be written
* @param off the start offset in the data
* @param len the number of bytes that are written
* @throws IOException If an I/O error has occurred.
*/
public void write(byte b[], int off, int len) throws IOException;
/**
* Flushes the stream. This will write any buffered
* output bytes.
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public void flush() throws IOException;
@ -84,7 +84,7 @@ public interface ObjectOutput extends DataOutput, AutoCloseable {
* Closes the stream. This method must be called
* to release any resources associated with the
* stream.
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public void close() throws IOException;
}

View file

@ -107,7 +107,7 @@ public abstract class OutputStream implements Closeable, Flushable {
* implementation for this method.
*
* @param b the <code>byte</code>.
* @exception IOException if an I/O error occurs. In particular,
* @throws IOException if an I/O error occurs. In particular,
* an <code>IOException</code> may be thrown if the
* output stream has been closed.
*/
@ -120,7 +120,7 @@ public abstract class OutputStream implements Closeable, Flushable {
* <code>write(b, 0, b.length)</code>.
*
* @param b the data.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.OutputStream#write(byte[], int, int)
*/
public void write(byte b[]) throws IOException {
@ -151,7 +151,7 @@ public abstract class OutputStream implements Closeable, Flushable {
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs. In particular,
* @throws IOException if an I/O error occurs. In particular,
* an <code>IOException</code> is thrown if the output
* stream is closed.
*/
@ -179,7 +179,7 @@ public abstract class OutputStream implements Closeable, Flushable {
* <p>
* The <code>flush</code> method of <code>OutputStream</code> does nothing.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void flush() throws IOException {
}
@ -192,7 +192,7 @@ public abstract class OutputStream implements Closeable, Flushable {
* <p>
* The <code>close</code> method of <code>OutputStream</code> does nothing.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void close() throws IOException {
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -87,7 +87,7 @@ public class OutputStreamWriter extends Writer {
* The name of a supported
* {@link java.nio.charset.Charset charset}
*
* @exception UnsupportedEncodingException
* @throws UnsupportedEncodingException
* If the named encoding is not supported
*/
public OutputStreamWriter(OutputStream out, String charsetName)
@ -187,7 +187,7 @@ public class OutputStreamWriter extends Writer {
/**
* Writes a single character.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void write(int c) throws IOException {
se.write(c);
@ -248,7 +248,7 @@ public class OutputStreamWriter extends Writer {
/**
* Flushes the stream.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void flush() throws IOException {
se.flush();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* 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
@ -100,7 +100,7 @@ public class PipedInputStream extends InputStream {
* as input from this stream.
*
* @param src the stream to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public PipedInputStream(PipedOutputStream src) throws IOException {
this(src, DEFAULT_PIPE_SIZE);
@ -116,8 +116,8 @@ public class PipedInputStream extends InputStream {
*
* @param src the stream to connect to.
* @param pipeSize the size of the pipe's buffer.
* @exception IOException if an I/O error occurs.
* @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @throws IOException if an I/O error occurs.
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6
*/
public PipedInputStream(PipedOutputStream src, int pipeSize)
@ -147,7 +147,7 @@ public class PipedInputStream extends InputStream {
* connected} to a <code>PipedOutputStream</code> before being used.
*
* @param pipeSize the size of the pipe's buffer.
* @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6
*/
public PipedInputStream(int pipeSize) {
@ -182,7 +182,7 @@ public class PipedInputStream extends InputStream {
* The two calls have the same effect.
*
* @param src The piped output stream to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void connect(PipedOutputStream src) throws IOException {
src.connect(this);
@ -191,11 +191,11 @@ public class PipedInputStream extends InputStream {
/**
* Receives a byte of data. This method will block if no input is
* available.
* @param b the byte being received
* @exception IOException If the pipe is <a href="#BROKEN"> <code>broken</code></a>,
* @param b the byte being received
* @throws IOException If the pipe is <a href="#BROKEN"> <code>broken</code></a>,
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed, or if an I/O error occurs.
* @since 1.1
* @since 1.1
*/
protected synchronized void receive(int b) throws IOException {
checkStateForReceive();
@ -215,10 +215,10 @@ public class PipedInputStream extends InputStream {
/**
* Receives data into an array of bytes. This method will
* block until some input is available.
* @param b the buffer into which the data is received
* @param off the start offset of the data
* @param len the maximum number of bytes received
* @exception IOException If the pipe is <a href="#BROKEN"> broken</a>,
* @param b the buffer into which the data is received
* @param off the start offset of the data
* @param len the maximum number of bytes received
* @throws IOException If the pipe is <a href="#BROKEN"> broken</a>,
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed,or if an I/O error occurs.
*/
@ -293,9 +293,9 @@ public class PipedInputStream extends InputStream {
* This method blocks until input data is available, the end of the
* stream is detected, or an exception is thrown.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* stream is reached.
* @exception IOException if the pipe is
* @return the next byte of data, or <code>-1</code> if the end of the
* stream is reached.
* @throws IOException if the pipe is
* {@link #connect(java.io.PipedOutputStream) unconnected},
* <a href="#BROKEN"> <code>broken</code></a>, closed,
* or if an I/O error occurs.
@ -356,11 +356,11 @@ public class PipedInputStream extends InputStream {
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the stream has been reached.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @exception IOException if the pipe is <a href="#BROKEN"> <code>broken</code></a>,
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws IOException if the pipe is <a href="#BROKEN"> <code>broken</code></a>,
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed, or if an I/O error occurs.
*/
@ -418,10 +418,10 @@ public class PipedInputStream extends InputStream {
* without blocking, or {@code 0} if this input stream has been
* closed by invoking its {@link #close()} method, or if the pipe
* is {@link #connect(java.io.PipedOutputStream) unconnected}, or
* <a href="#BROKEN"> <code>broken</code></a>.
* <a href="#BROKEN"> <code>broken</code></a>.
*
* @exception IOException if an I/O error occurs.
* @since 1.0.2
* @throws IOException if an I/O error occurs.
* @since 1.0.2
*/
public synchronized int available() throws IOException {
if(in < 0)
@ -438,7 +438,7 @@ public class PipedInputStream extends InputStream {
* Closes this piped input stream and releases any system resources
* associated with the stream.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void close() throws IOException {
closedByReader = true;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
* 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
@ -58,7 +58,7 @@ class PipedOutputStream extends OutputStream {
* available as input from <code>snk</code>.
*
* @param snk The piped input stream to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public PipedOutputStream(PipedInputStream snk) throws IOException {
connect(snk);
@ -91,7 +91,7 @@ class PipedOutputStream extends OutputStream {
* The two calls have the same effect.
*
* @param snk the piped input stream to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public synchronized void connect(PipedInputStream snk) throws IOException {
if (snk == null) {
@ -110,8 +110,8 @@ class PipedOutputStream extends OutputStream {
* <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>,
* @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.
*/
@ -128,10 +128,10 @@ class PipedOutputStream extends OutputStream {
* This method blocks until all the bytes are written to the output
* 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>,
* @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.
*/
@ -154,7 +154,7 @@ class PipedOutputStream extends OutputStream {
* to be written out.
* This will notify any readers that bytes are waiting in the pipe.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public synchronized void flush() throws IOException {
if (sink != null) {
@ -169,7 +169,7 @@ class PipedOutputStream extends OutputStream {
* associated with this stream. This stream may no longer be used for
* writing bytes.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void close() throws IOException {
if (sink != null) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -76,7 +76,7 @@ public class PipedReader extends Reader {
* will then be available as input from this stream.
*
* @param src the stream to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public PipedReader(PipedWriter src) throws IOException {
this(src, DEFAULT_PIPE_SIZE);
@ -90,8 +90,8 @@ public class PipedReader extends Reader {
* @param src the stream to connect to.
* @param pipeSize the size of the pipe's buffer.
* @exception IOException if an I/O error occurs.
* @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @throws IOException if an I/O error occurs.
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6
*/
public PipedReader(PipedWriter src, int pipeSize) throws IOException {
@ -120,8 +120,8 @@ public class PipedReader extends Reader {
* before being used.
*
* @param pipeSize the size of the pipe's buffer.
* @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6
*/
public PipedReader(int pipeSize) {
initPipe(pipeSize);
@ -155,7 +155,7 @@ public class PipedReader extends Reader {
* The two calls have the same effect.
*
* @param src The piped writer to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void connect(PipedWriter src) throws IOException {
src.connect(this);
@ -223,9 +223,9 @@ public class PipedReader extends Reader {
* This method blocks until input data is available, the end of
* the stream is detected, or an exception is thrown.
*
* @return the next character of data, or <code>-1</code> if the end of the
* stream is reached.
* @exception IOException if the pipe is
* @return the next character of data, or <code>-1</code> if the end of the
* stream is reached.
* @throws IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* {@link #connect(java.io.PipedWriter) unconnected}, closed,
* or an I/O error occurs.
@ -282,11 +282,11 @@ public class PipedReader extends Reader {
* @return the total number of characters read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the stream has been reached.
* @exception IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* {@link #connect(java.io.PipedWriter) unconnected}, closed,
* or an I/O error occurs.
* @exception IndexOutOfBoundsException {@inheritDoc}
* @throws IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* {@link #connect(java.io.PipedWriter) unconnected}, closed,
* or an I/O error occurs.
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public synchronized int read(char cbuf[], int off, int len) throws IOException {
if (!connected) {
@ -330,9 +330,9 @@ public class PipedReader extends Reader {
* Tell whether this stream is ready to be read. A piped character
* stream is ready if the circular buffer is not empty.
*
* @exception IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* {@link #connect(java.io.PipedWriter) unconnected}, or closed.
* @throws IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* {@link #connect(java.io.PipedWriter) unconnected}, or closed.
*/
public synchronized boolean ready() throws IOException {
if (!connected) {
@ -354,7 +354,7 @@ public class PipedReader extends Reader {
* Closes this piped stream and releases any system resources
* associated with the stream.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void close() throws IOException {
in = -1;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -53,7 +53,7 @@ public class PipedWriter extends Writer {
* available as input from <code>snk</code>.
*
* @param snk The piped reader to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public PipedWriter(PipedReader snk) throws IOException {
connect(snk);
@ -86,7 +86,7 @@ public class PipedWriter extends Writer {
* The two calls have the same effect.
*
* @param snk the piped reader to connect to.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public synchronized void connect(PipedReader snk) throws IOException {
if (snk == null) {
@ -111,8 +111,8 @@ public class PipedWriter extends Writer {
* <p>
* Implements the <code>write</code> method of <code>Writer</code>.
*
* @param c the <code>char</code> to be written.
* @exception IOException if the pipe is
* @param c the <code>char</code> to be written.
* @throw IOException if the pipe is
* <a href=PipedOutputStream.html#BROKEN> <code>broken</code></a>,
* {@link #connect(java.io.PipedReader) unconnected}, closed
* or an I/O error occurs.
@ -133,9 +133,9 @@ public class PipedWriter extends Writer {
* stream, but the thread is no longer alive, then an
* {@code IOException} is thrown.
*
* @param cbuf the data.
* @param off the start offset in the data.
* @param len the number of characters to write.
* @param cbuf the data.
* @param off the start offset in the data.
* @param len the number of characters to write.
*
* @throws IndexOutOfBoundsException
* If {@code off} is negative, or {@code len} is negative,
@ -161,7 +161,7 @@ public class PipedWriter extends Writer {
* to be written out.
* This will notify any readers that characters are waiting in the pipe.
*
* @exception IOException if the pipe is closed, or an I/O error occurs.
* @throws IOException if the pipe is closed, or an I/O error occurs.
*/
public synchronized void flush() throws IOException {
if (sink != null) {
@ -179,7 +179,7 @@ public class PipedWriter extends Writer {
* associated with this stream. This stream may no longer be used for
* writing characters.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void close() throws IOException {
closed = true;

View file

@ -84,7 +84,7 @@ class PushbackInputStream extends FilterInputStream {
*
* @param in the input stream from which bytes will be read.
* @param size the size of the pushback buffer.
* @exception IllegalArgumentException if {@code size <= 0}
* @throws IllegalArgumentException if {@code size <= 0}
* @since 1.1
*/
public PushbackInputStream(InputStream in, int size) {
@ -123,7 +123,7 @@ class PushbackInputStream extends FilterInputStream {
*
* @return the next byte of data, 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.
* @see java.io.InputStream#read()
@ -150,11 +150,11 @@ class PushbackInputStream extends FilterInputStream {
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* the stream has been reached.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @exception IOException if this input stream has been closed by
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
* or an I/O error occurs.
* @see java.io.InputStream#read(byte[], int, int)
@ -196,7 +196,7 @@ class PushbackInputStream extends FilterInputStream {
*
* @param b the <code>int</code> value whose low-order
* byte is to be pushed back.
* @exception IOException If there is not enough room in the pushback
* @throws IOException If there is not enough room in the pushback
* buffer for the byte, or this input stream has been closed by
* invoking its {@link #close()} method.
*/
@ -214,11 +214,11 @@ class PushbackInputStream extends FilterInputStream {
* read will have the value <code>b[off]</code>, the byte after that will
* have the value <code>b[off+1]</code>, and so forth.
*
* @param b the byte array to push back.
* @param off the start offset of the data.
* @param len the number of bytes to push back.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IOException If there is not enough room in the pushback
* @param b the byte array to push back.
* @param off the start offset of the data.
* @param len the number of bytes to push back.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IOException If there is not enough room in the pushback
* buffer for the specified number of bytes,
* or this input stream has been closed by
* invoking its {@link #close()} method.
@ -239,9 +239,9 @@ class PushbackInputStream extends FilterInputStream {
* will have the value <code>b[0]</code>, the byte after that will have the
* value <code>b[1]</code>, and so forth.
*
* @param b the byte array to push back
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IOException If there is not enough room in the pushback
* @param b the byte array to push back
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IOException If there is not enough room in the pushback
* buffer for the specified number of bytes,
* or this input stream has been closed by
* invoking its {@link #close()} method.
@ -264,7 +264,7 @@ class PushbackInputStream extends FilterInputStream {
*
* @return the number of bytes that can be read (or skipped over) from
* the 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.
* @see java.io.FilterInputStream#in
@ -327,8 +327,8 @@ class PushbackInputStream extends FilterInputStream {
*
* @return <code>false</code>, since this class does not support the
* <code>mark</code> and <code>reset</code> methods.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/
public boolean markSupported() {
return false;
@ -355,7 +355,7 @@ class PushbackInputStream extends FilterInputStream {
* <code>PushbackInputStream</code> does nothing except throw an
* <code>IOException</code>.
*
* @exception IOException if this method is invoked.
* @throws IOException if this method is invoked.
* @see java.io.InputStream#mark(int)
* @see java.io.IOException
*/
@ -370,7 +370,7 @@ class PushbackInputStream extends FilterInputStream {
* 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 synchronized void close() throws IOException {
if (in == null)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -47,7 +47,7 @@ public class PushbackReader extends FilterReader {
*
* @param in The reader from which characters will be read
* @param size The size of the pushback buffer
* @exception IllegalArgumentException if {@code size <= 0}
* @throws IllegalArgumentException if {@code size <= 0}
*/
public PushbackReader(Reader in, int size) {
super(in);
@ -79,7 +79,7 @@ public class PushbackReader extends FilterReader {
* @return The character read, or -1 if the end of the stream has been
* reached
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read() throws IOException {
synchronized (lock) {
@ -101,8 +101,8 @@ public class PushbackReader extends FilterReader {
* @return The number of characters read, or -1 if the end of the
* stream has been reached
*
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public int read(char cbuf[], int off, int len) throws IOException {
synchronized (lock) {
@ -146,8 +146,8 @@ public class PushbackReader extends FilterReader {
*
* @param c The int value representing a character to be pushed back
*
* @exception IOException If the pushback buffer is full,
* or if some other I/O error occurs
* @throws IOException If the pushback buffer is full,
* or if some other I/O error occurs
*/
public void unread(int c) throws IOException {
synchronized (lock) {
@ -165,11 +165,11 @@ public class PushbackReader extends FilterReader {
* character after that will have the value <code>cbuf[off+1]</code>, and
* so forth.
*
* @param cbuf Character array
* @param off Offset of first character to push back
* @param len Number of characters to push back
* @param cbuf Character array
* @param off Offset of first character to push back
* @param len Number of characters to push back
*
* @exception IOException If there is insufficient room in the pushback
* @throws IOException If there is insufficient room in the pushback
* buffer, or if some other I/O error occurs
*/
public void unread(char cbuf[], int off, int len) throws IOException {
@ -188,9 +188,9 @@ public class PushbackReader extends FilterReader {
* read will have the value <code>cbuf[0]</code>, the character after that
* will have the value <code>cbuf[1]</code>, and so forth.
*
* @param cbuf Character array to push back
* @param cbuf Character array to push back
*
* @exception IOException If there is insufficient room in the pushback
* @throws IOException If there is insufficient room in the pushback
* buffer, or if some other I/O error occurs
*/
public void unread(char cbuf[]) throws IOException {
@ -200,7 +200,7 @@ public class PushbackReader extends FilterReader {
/**
* Tells whether this stream is ready to be read.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public boolean ready() throws IOException {
synchronized (lock) {
@ -213,7 +213,7 @@ public class PushbackReader extends FilterReader {
* Marks the present position in the stream. The <code>mark</code>
* for class <code>PushbackReader</code> always throws an exception.
*
* @exception IOException Always, since mark is not supported
* @throws IOException Always, since mark is not supported
*/
public void mark(int readAheadLimit) throws IOException {
throw new IOException("mark/reset not supported");
@ -223,7 +223,7 @@ public class PushbackReader extends FilterReader {
* Resets the stream. The <code>reset</code> method of
* <code>PushbackReader</code> always throws an exception.
*
* @exception IOException Always, since reset is not supported
* @throws IOException Always, since reset is not supported
*/
public void reset() throws IOException {
throw new IOException("mark/reset not supported");
@ -244,7 +244,7 @@ public class PushbackReader extends FilterReader {
* Closing a previously closed stream has no effect. This method will block
* while there is another thread blocking on the reader.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void close() throws IOException {
synchronized (lock) {
@ -257,12 +257,12 @@ public class PushbackReader extends FilterReader {
* Skips characters. This method will block until some characters are
* available, an I/O error occurs, or the end of the stream is reached.
*
* @param n The number of characters to skip
* @param n The number of characters to skip
*
* @return The number of characters actually skipped
*
* @exception IllegalArgumentException If <code>n</code> is negative.
* @exception IOException If an I/O error occurs
* @throws IllegalArgumentException If <code>n</code> is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {
if (n < 0L)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -103,17 +103,17 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @param name the system-dependent filename
* @param mode the access <a href="#mode">mode</a>
* @exception IllegalArgumentException if the mode argument is not equal
* @throws IllegalArgumentException if the mode argument is not equal
* to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
* {@code "rwd"}
* @exception FileNotFoundException
* if the mode is {@code "r"} but the given string does not
* denote an existing regular file, or if the mode begins with
* {@code "rw"} but the given string does not denote an
* existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs
* while opening or creating the file
* @exception SecurityException if a security manager exists and its
* @throws FileNotFoundException
* if the mode is {@code "r"} but the given string does not
* denote an existing regular file, or if the mode begins with
* {@code "rw"} but the given string does not denote an
* existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs
* while opening or creating the file
* @throws SecurityException if a security manager exists and its
* {@code checkRead} method denies read access to the file
* or the mode is {@code "rw"} and the security manager's
* {@code checkWrite} method denies write access to the file
@ -190,17 +190,17 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @param file the file object
* @param mode the access mode, as described
* <a href="#mode">above</a>
* @exception IllegalArgumentException if the mode argument is not equal
* @throws IllegalArgumentException if the mode argument is not equal
* to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
* {@code "rwd"}
* @exception FileNotFoundException
* if the mode is {@code "r"} but the given file object does
* not denote an existing regular file, or if the mode begins
* with {@code "rw"} but the given file object does not denote
* an existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs
* while opening or creating the file
* @exception SecurityException if a security manager exists and its
* @throws FileNotFoundException
* if the mode is {@code "r"} but the given file object does
* not denote an existing regular file, or if the mode begins
* with {@code "rw"} but the given file object does not denote
* an existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs
* while opening or creating the file
* @throws SecurityException if a security manager exists and its
* {@code checkRead} method denies read access to the file
* or the mode is {@code "rw"} and the security manager's
* {@code checkWrite} method denies write access to the file
@ -267,7 +267,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* stream.
*
* @return the file descriptor object associated with this stream.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.FileDescriptor
*/
public final FileDescriptor getFD() throws IOException {
@ -361,7 +361,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next byte of data, or {@code -1} if the end of the
* file has been reached.
* @exception IOException if an I/O error occurs. Not thrown if
* @throws IOException if an I/O error occurs. Not thrown if
* end-of-file has been reached.
*/
public int read() throws IOException {
@ -372,10 +372,10 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
/**
* Reads a sub array as a sequence of bytes.
* @param b the buffer into which the data is read.
* @param off the start offset of the data.
* @param len the number of bytes to read.
* @exception IOException If an I/O error has occurred.
* @param b the buffer into which the data is read.
* @param off the start offset of the data.
* @param len the number of bytes to read.
* @throws IOException If an I/O error has occurred.
*/
private native int readBytes(byte b[], int off, int len) throws IOException;
@ -396,13 +396,13 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @return the total number of bytes read into the buffer, or
* {@code -1} if there is no more data because the end of
* the file has been reached.
* @exception IOException If the first byte cannot be read for any reason
* other than end of file, or if the random access file has been closed, or if
* some other I/O error occurs.
* @exception NullPointerException If {@code b} is {@code null}.
* @exception IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws IOException If the first byte cannot be read for any reason
* other than end of file, or if the random access file has been closed,
* or if some other I/O error occurs.
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
*/
public int read(byte b[], int off, int len) throws IOException {
return readBytes(b, off, len);
@ -422,10 +422,10 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @return the total number of bytes read into the buffer, or
* {@code -1} if there is no more data because the end of
* this file has been reached.
* @exception IOException If the first byte cannot be read for any reason
* other than end of file, or if the random access file has been closed, or if
* some other I/O error occurs.
* @exception NullPointerException If {@code b} is {@code null}.
* @throws IOException If the first byte cannot be read for any reason
* other than end of file, or if the random access file has been closed,
* or if some other I/O error occurs.
* @throws NullPointerException If {@code b} is {@code null}.
*/
public int read(byte b[]) throws IOException {
return readBytes(b, 0, b.length);
@ -490,7 +490,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @param n the number of bytes to be skipped.
* @return the actual number of bytes skipped.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public int skipBytes(int n) throws IOException {
long pos;
@ -519,7 +519,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* the current file pointer.
*
* @param b the {@code byte} to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void write(int b) throws IOException {
write0(b);
@ -529,11 +529,11 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
/**
* Writes a sub array as a sequence of bytes.
* @param b the data to be written
* @param b the data to be written
* @param off the start offset in the data
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
* @param off the start offset in the data
* @param len the number of bytes that are written
* @throws IOException If an I/O error has occurred.
*/
private native void writeBytes(byte b[], int off, int len) throws IOException;
@ -542,7 +542,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* to this file, starting at the current file pointer.
*
* @param b the data.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void write(byte b[]) throws IOException {
writeBytes(b, 0, b.length);
@ -555,7 +555,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void write(byte b[], int off, int len) throws IOException {
writeBytes(b, off, len);
@ -568,7 +568,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the offset from the beginning of the file, in bytes,
* at which the next read or write occurs.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public native long getFilePointer() throws IOException;
@ -583,7 +583,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @param pos the offset position, measured in bytes from the
* beginning of the file, at which to set the file
* pointer.
* @exception IOException if {@code pos} is less than
* @throws IOException if {@code pos} is less than
* {@code 0} or if an I/O error occurs.
*/
public void seek(long pos) throws IOException {
@ -600,7 +600,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* Returns the length of this file.
*
* @return the length of this file, measured in bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public native long length() throws IOException;
@ -620,7 +620,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* the extended portion of the file are not defined.
*
* @param newLength The desired length of the file
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
* @since 1.2
*/
public native void setLength(long newLength) throws IOException;
@ -634,7 +634,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* <p> If this file has an associated channel then the channel is closed
* as well.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*
* @revised 1.4
* @spec JSR-51
@ -678,8 +678,8 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* is detected, or an exception is thrown.
*
* @return the {@code boolean} value read.
* @exception EOFException if this file has reached the end.
* @exception IOException if an I/O error occurs.
* @throws EOFException if this file has reached the end.
* @throws IOException if an I/O error occurs.
*/
public final boolean readBoolean() throws IOException {
int ch = this.read();
@ -703,8 +703,8 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next byte of this file as a signed eight-bit
* {@code byte}.
* @exception EOFException if this file has reached the end.
* @exception IOException if an I/O error occurs.
* @throws EOFException if this file has reached the end.
* @throws IOException if an I/O error occurs.
*/
public final byte readByte() throws IOException {
int ch = this.read();
@ -723,8 +723,8 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next byte of this file, interpreted as an unsigned
* eight-bit number.
* @exception EOFException if this file has reached the end.
* @exception IOException if an I/O error occurs.
* @throws EOFException if this file has reached the end.
* @throws IOException if an I/O error occurs.
*/
public final int readUnsignedByte() throws IOException {
int ch = this.read();
@ -749,9 +749,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next two bytes of this file, interpreted as a signed
* 16-bit number.
* @exception EOFException if this file reaches the end before reading
* @throws EOFException if this file reaches the end before reading
* two bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final short readShort() throws IOException {
int ch1 = this.read();
@ -777,9 +777,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next two bytes of this file, interpreted as an unsigned
* 16-bit integer.
* @exception EOFException if this file reaches the end before reading
* @throws EOFException if this file reaches the end before reading
* two bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final int readUnsignedShort() throws IOException {
int ch1 = this.read();
@ -805,9 +805,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next two bytes of this file, interpreted as a
* {@code char}.
* @exception EOFException if this file reaches the end before reading
* @throws EOFException if this file reaches the end before reading
* two bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final char readChar() throws IOException {
int ch1 = this.read();
@ -833,9 +833,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next four bytes of this file, interpreted as an
* {@code int}.
* @exception EOFException if this file reaches the end before reading
* @throws EOFException if this file reaches the end before reading
* four bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final int readInt() throws IOException {
int ch1 = this.read();
@ -871,9 +871,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next eight bytes of this file, interpreted as a
* {@code long}.
* @exception EOFException if this file reaches the end before reading
* @throws EOFException if this file reaches the end before reading
* eight bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final long readLong() throws IOException {
return ((long)(readInt()) << 32) + (readInt() & 0xFFFFFFFFL);
@ -892,9 +892,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next four bytes of this file, interpreted as a
* {@code float}.
* @exception EOFException if this file reaches the end before reading
* @throws EOFException if this file reaches the end before reading
* four bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.RandomAccessFile#readInt()
* @see java.lang.Float#intBitsToFloat(int)
*/
@ -915,9 +915,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next eight bytes of this file, interpreted as a
* {@code double}.
* @exception EOFException if this file reaches the end before reading
* @throws EOFException if this file reaches the end before reading
* eight bytes.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.RandomAccessFile#readLong()
* @see java.lang.Double#longBitsToDouble(long)
*/
@ -946,7 +946,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
*
* @return the next line of text from this file, or null if end
* of file is encountered before even one byte is read.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final String readLine() throws IOException {
@ -997,10 +997,10 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* stream is detected, or an exception is thrown.
*
* @return a Unicode string.
* @exception EOFException if this file reaches the end before
* @throws EOFException if this file reaches the end before
* reading all the bytes.
* @exception IOException if an I/O error occurs.
* @exception UTFDataFormatException if the bytes do not represent
* @throws IOException if an I/O error occurs.
* @throws UTFDataFormatException if the bytes do not represent
* valid modified UTF-8 encoding of a Unicode string.
* @see java.io.RandomAccessFile#readUnsignedShort()
*/
@ -1016,7 +1016,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* the current position of the file pointer.
*
* @param v a {@code boolean} value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final void writeBoolean(boolean v) throws IOException {
write(v ? 1 : 0);
@ -1028,7 +1028,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* write starts at the current position of the file pointer.
*
* @param v a {@code byte} value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final void writeByte(int v) throws IOException {
write(v);
@ -1040,7 +1040,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* The write starts at the current position of the file pointer.
*
* @param v a {@code short} to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final void writeShort(int v) throws IOException {
write((v >>> 8) & 0xFF);
@ -1054,7 +1054,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* file pointer.
*
* @param v a {@code char} value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final void writeChar(int v) throws IOException {
write((v >>> 8) & 0xFF);
@ -1067,7 +1067,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* The write starts at the current position of the file pointer.
*
* @param v an {@code int} to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final void writeInt(int v) throws IOException {
write((v >>> 24) & 0xFF);
@ -1082,7 +1082,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* The write starts at the current position of the file pointer.
*
* @param v a {@code long} to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final void writeLong(long v) throws IOException {
write((int)(v >>> 56) & 0xFF);
@ -1104,7 +1104,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* current position of the file pointer.
*
* @param v a {@code float} value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.lang.Float#floatToIntBits(float)
*/
public final void writeFloat(float v) throws IOException {
@ -1119,7 +1119,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* position of the file pointer.
*
* @param v a {@code double} value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.lang.Double#doubleToLongBits(double)
*/
public final void writeDouble(double v) throws IOException {
@ -1133,7 +1133,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* the file pointer.
*
* @param s a string of bytes to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("deprecation")
public final void writeBytes(String s) throws IOException {
@ -1150,7 +1150,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* position of the file pointer.
*
* @param s a {@code String} value to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.RandomAccessFile#writeChar(int)
*/
public final void writeChars(String s) throws IOException {
@ -1180,7 +1180,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* for each character.
*
* @param str a string to be written.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public final void writeUTF(String str) throws IOException {
DataOutputStream.writeUTF(str, this);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -203,7 +203,7 @@ public abstract class Reader implements Readable, Closeable {
* ({@code 0x00-0xffff}), or -1 if the end of the stream has
* been reached
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read() throws IOException {
char cb[] = new char[1];
@ -223,7 +223,7 @@ public abstract class Reader implements Readable, Closeable {
* if the end of the stream
* has been reached
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read(char cbuf[]) throws IOException {
return read(cbuf, 0, cbuf.length);
@ -241,8 +241,8 @@ public abstract class Reader implements Readable, Closeable {
* @return The number of characters read, or -1 if the end of the
* stream has been reached
*
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException
* If {@code off} is negative, or {@code len} is negative,
* or {@code len} is greater than {@code cbuf.length - off}
*/
@ -262,8 +262,8 @@ public abstract class Reader implements Readable, Closeable {
*
* @return The number of characters actually skipped
*
* @exception IllegalArgumentException If <code>n</code> is negative.
* @exception IOException If an I/O error occurs
* @throws IllegalArgumentException If <code>n</code> is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {
if (n < 0L)
@ -290,7 +290,7 @@ public abstract class Reader implements Readable, Closeable {
* false otherwise. Note that returning false does not guarantee that the
* next read will block.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public boolean ready() throws IOException {
return false;
@ -317,7 +317,7 @@ public abstract class Reader implements Readable, Closeable {
* reading this many characters, attempting to
* reset the stream may fail.
*
* @exception IOException If the stream does not support mark(),
* @throws IOException If the stream does not support mark(),
* or if some other I/O error occurs
*/
public void mark(int readAheadLimit) throws IOException {
@ -332,7 +332,7 @@ public abstract class Reader implements Readable, Closeable {
* character-input streams support the reset() operation, and some support
* reset() without supporting mark().
*
* @exception IOException If the stream has not been marked,
* @throws IOException If the stream has not been marked,
* or if the mark has been invalidated,
* or if the stream does not support reset(),
* or if some other I/O error occurs
@ -347,7 +347,7 @@ public abstract class Reader implements Readable, Closeable {
* mark(), 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 abstract void close() throws IOException;

View file

@ -118,13 +118,13 @@ class SequenceInputStream extends InputStream {
* This method simply calls {@code available} of the current underlying
* input stream and returns the result.
*
* @return an estimate of the number of bytes that can be read (or
* skipped over) from the current underlying input stream
* without blocking or {@code 0} if this input stream
* has been closed by invoking its {@link #close()} method
* @exception IOException if an I/O error occurs.
* @return an estimate of the number of bytes that can be read (or
* skipped over) from the current underlying input stream
* without blocking or {@code 0} if this input stream
* has been closed by invoking its {@link #close()} method
* @throw IOException if an I/O error occurs.
*
* @since 1.1
* @since 1.1
*/
public int available() throws IOException {
if (in == null) {
@ -149,7 +149,7 @@ class SequenceInputStream extends InputStream {
*
* @return the next byte of data, or <code>-1</code> if the end of the
* stream is reached.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public int read() throws IOException {
while (in != null) {
@ -179,11 +179,11 @@ class SequenceInputStream extends InputStream {
* at which the data is written.
* @param len the maximum number of bytes read.
* @return int the number of bytes read.
* @exception NullPointerException If <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @exception IOException if an I/O error occurs.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is
* greater than <code>b.length - off</code>
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[], int off, int len) throws IOException {
if (in == null) {
@ -217,7 +217,7 @@ class SequenceInputStream extends InputStream {
* are requested from the enumeration and closed
* before the <code>close</code> method returns.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*/
public void close() throws IOException {
IOException ioe = null;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* 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
@ -517,7 +517,7 @@ public class StreamTokenizer {
* is returned.
*
* @return the value of the {@code ttype} field.
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
* @see java.io.StreamTokenizer#nval
* @see java.io.StreamTokenizer#sval
* @see java.io.StreamTokenizer#ttype

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -62,7 +62,7 @@ public class StringReader extends Reader {
* @return The character read, or -1 if the end of the stream has been
* reached
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public int read() throws IOException {
synchronized (lock) {
@ -83,8 +83,8 @@ public class StringReader extends Reader {
* @return The number of characters read, or -1 if the end of the
* stream has been reached
*
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public int read(char cbuf[], int off, int len) throws IOException {
synchronized (lock) {
@ -118,7 +118,7 @@ public class StringReader extends Reader {
* <p>If the entire string has been read or skipped, then this method has
* no effect and always returns 0.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public long skip(long ns) throws IOException {
synchronized (lock) {
@ -138,7 +138,7 @@ public class StringReader extends Reader {
*
* @return True if the next read() is guaranteed not to block for input
*
* @exception IOException If the stream is closed
* @throws IOException If the stream is closed
*/
public boolean ready() throws IOException {
synchronized (lock) {
@ -164,8 +164,8 @@ public class StringReader extends Reader {
* is no actual limit, so this argument must not
* be negative, but is otherwise ignored.
*
* @exception IllegalArgumentException If {@code readAheadLimit < 0}
* @exception IOException If an I/O error occurs
* @throws IllegalArgumentException If {@code readAheadLimit < 0}
* @throws IOException If an I/O error occurs
*/
public void mark(int readAheadLimit) throws IOException {
if (readAheadLimit < 0){
@ -181,7 +181,7 @@ public class StringReader extends Reader {
* Resets the stream to the most recent mark, or to the beginning of the
* string if it has never been marked.
*
* @exception IOException If an I/O error occurs
* @throws IOException If an I/O error occurs
*/
public void reset() throws IOException {
synchronized (lock) {