< prev index next >
src/java.base/share/classes/java/io/CharArrayReader.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
@@ -1,7 +1,7 @@
/*
- * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -93,11 +93,11 @@
}
/**
* 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) {
ensureOpen();
if (pos >= count)
@@ -113,12 +113,12 @@
* @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) {
ensureOpen();
if ((off < 0) || (off > b.length) || (len < 0) ||
@@ -153,11 +153,11 @@
* 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
+ * @throws IOException If the stream is closed, or an I/O error occurs
*/
public long skip(long n) throws IOException {
synchronized (lock) {
ensureOpen();
@@ -175,11 +175,11 @@
/**
* 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) {
ensureOpen();
return (count - pos) > 0;
@@ -201,11 +201,11 @@
* read while still preserving the mark. Because
* the stream's input comes from a character array,
* 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) {
ensureOpen();
markedPos = pos;
@@ -214,11 +214,11 @@
/**
* 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) {
ensureOpen();
pos = markedPos;
< prev index next >