< prev index next >
src/java.base/share/classes/java/io/BufferedReader.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
@@ -93,11 +93,11 @@
* the specified size.
*
* @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);
if (sz <= 0)
throw new IllegalArgumentException("Buffer size <= 0");
@@ -170,11 +170,11 @@
* Reads a single character.
*
* @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) {
ensureOpen();
for (;;) {
@@ -269,12 +269,12 @@
* @param len Maximum number of characters to read
*
* @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) {
ensureOpen();
if ((off < 0) || (off > cbuf.length) || (len < 0) ||
@@ -309,11 +309,11 @@
* any line-termination characters, or null if the end of the
* stream has been reached without reading any characters
*
* @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;
int startChar;
@@ -386,11 +386,11 @@
*
* @return A String containing the contents of the line, not including
* 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
*/
public String readLine() throws IOException {
return readLine(false, null);
@@ -401,12 +401,12 @@
*
* @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) {
throw new IllegalArgumentException("skip value is negative");
}
@@ -442,11 +442,11 @@
/**
* Tells whether this stream is ready to be read. A buffered character
* 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) {
ensureOpen();
@@ -489,12 +489,12 @@
* A limit value larger than the size of the input
* buffer will cause a new buffer to be allocated
* 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) {
throw new IllegalArgumentException("Read-ahead limit < 0");
}
@@ -507,11 +507,11 @@
}
/**
* 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 {
synchronized (lock) {
ensureOpen();
< prev index next >