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) {

View file

@ -321,10 +321,10 @@ public final class Class<T> implements java.io.Serializable,
* @param className the fully qualified name of the desired class.
* @return the {@code Class} object for the class with the
* specified name.
* @exception LinkageError if the linkage fails
* @exception ExceptionInInitializerError if the initialization provoked
* @throws LinkageError if the linkage fails
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails
* @exception ClassNotFoundException if the class cannot be located
* @throws ClassNotFoundException if the class cannot be located
*/
@CallerSensitive
public static Class<?> forName(String className)
@ -379,12 +379,12 @@ public final class Class<T> implements java.io.Serializable,
* @param loader class loader from which the class must be loaded
* @return class object representing the desired class
*
* @exception LinkageError if the linkage fails
* @exception ExceptionInInitializerError if the initialization provoked
* @throws LinkageError if the linkage fails
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails
* @exception ClassNotFoundException if the class cannot be located by
* @throws ClassNotFoundException if the class cannot be located by
* the specified class loader
* @exception SecurityException
* @throws SecurityException
* if a security manager is present, and the {@code loader} is
* {@code null}, and the caller's class loader is not
* {@code null}, and the caller does not have the
@ -667,12 +667,12 @@ public final class Class<T> implements java.io.Serializable,
* or via a widening reference conversion. See <em>The Java Language
* Specification</em>, sections 5.1.1 and 5.1.4 , for details.
*
* @param cls the {@code Class} object to be checked
* @return the {@code boolean} value indicating whether objects of the
* type {@code cls} can be assigned to objects of this class
* @exception NullPointerException if the specified Class parameter is
* @param cls the {@code Class} object to be checked
* @return the {@code boolean} value indicating whether objects of the
* type {@code cls} can be assigned to objects of this class
* @throws NullPointerException if the specified Class parameter is
* null.
* @since 1.1
* @since 1.1
*/
@HotSpotIntrinsicCandidate
public native boolean isAssignableFrom(Class<?> cls);
@ -1512,7 +1512,7 @@ public final class Class<T> implements java.io.Serializable,
* class. If the underlying class is a top level class this
* method returns {@code null}.
* @return the immediately enclosing class of the underlying class
* @exception SecurityException
* @throws SecurityException
* If a security manager, <i>s</i>, is present and the caller's
* class loader is not the same as or an ancestor of the class
* loader for the enclosing class and invocation of {@link

View file

@ -445,10 +445,10 @@ public abstract class ClassLoader {
* @param parent
* The parent class loader
*
* @throws SecurityException
* If a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow creation
* of a new class loader.
* @throws SecurityException
* If a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow creation
* of a new class loader.
*
* @since 1.2
*/
@ -509,8 +509,8 @@ public abstract class ClassLoader {
* to invoking {@link #loadClass(String, boolean) loadClass(name,
* false)}.
*
* @param name
* The <a href="#binary-name">binary name</a> of the class
* @param name
* The <a href="#binary-name">binary name</a> of the class
*
* @return The resulting {@code Class} object
*
@ -551,11 +551,11 @@ public abstract class ClassLoader {
* {@link #getClassLoadingLock getClassLoadingLock} method
* during the entire class loading process.
*
* @param name
* The <a href="#binary-name">binary name</a> of the class
* @param name
* The <a href="#binary-name">binary name</a> of the class
*
* @param resolve
* If {@code true} then resolve the class
* @param resolve
* If {@code true} then resolve the class
*
* @return The resulting {@code Class} object
*
@ -704,8 +704,8 @@ public abstract class ClassLoader {
*
* @implSpec The default implementation throws {@code ClassNotFoundException}.
*
* @param name
* The <a href="#binary-name">binary name</a> of the class
* @param name
* The <a href="#binary-name">binary name</a> of the class
*
* @return The resulting {@code Class} object
*

View file

@ -598,7 +598,7 @@ public final class Integer extends Number
* @param radix the radix to be used while parsing {@code s}.
* @return the integer represented by the string argument in the
* specified radix.
* @exception NumberFormatException if the {@code String}
* @throws NumberFormatException if the {@code String}
* does not contain a parsable {@code int}.
*/
public static int parseInt(String s, int radix)
@ -763,7 +763,7 @@ public final class Integer extends Number
* @param s a {@code String} containing the {@code int}
* representation to be parsed
* @return the integer value represented by the argument in decimal.
* @exception NumberFormatException if the string does not contain a
* @throws NumberFormatException if the string does not contain a
* parsable integer.
*/
public static int parseInt(String s) throws NumberFormatException {
@ -950,7 +950,7 @@ public final class Integer extends Number
* @return an {@code Integer} object holding the value
* represented by the string argument in the specified
* radix.
* @exception NumberFormatException if the {@code String}
* @throws NumberFormatException if the {@code String}
* does not contain a parsable {@code int}.
*/
public static Integer valueOf(String s, int radix) throws NumberFormatException {
@ -976,7 +976,7 @@ public final class Integer extends Number
* @param s the string to be parsed.
* @return an {@code Integer} object holding the value
* represented by the string argument.
* @exception NumberFormatException if the string cannot be parsed
* @throws NumberFormatException if the string cannot be parsed
* as an integer.
*/
public static Integer valueOf(String s) throws NumberFormatException {
@ -1393,7 +1393,7 @@ public final class Integer extends Number
* @param nm the {@code String} to decode.
* @return an {@code Integer} object holding the {@code int}
* value represented by {@code nm}
* @exception NumberFormatException if the {@code String} does not
* @throws NumberFormatException if the {@code String} does not
* contain a parsable integer.
* @see java.lang.Integer#parseInt(java.lang.String, int)
*/

View file

@ -233,7 +233,7 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated
* Returns true if this package is sealed with respect to the specified
* code source {@code url}.
*
* @param url the code source URL
* @param url the code source URL
* @return true if this package is sealed with respect to the given {@code url}
*/
public boolean isSealed(URL url) {
@ -267,12 +267,12 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated
* If the values are equal the period is skipped and the next pair of
* components is compared.
*
* @param desired the version string of the desired version.
* @param desired the version string of the desired version.
* @return true if this package's version number is greater
* than or equal to the desired version number
* than or equal to the desired version number
*
* @exception NumberFormatException if the current version is not known or
* the desired or current version is not of the correct dotted form.
* @throws NumberFormatException if the current version is not known or
* the desired or current version is not of the correct dotted form.
*/
public boolean isCompatibleWith(String desired)
throws NumberFormatException

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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
@ -223,9 +223,9 @@ final class ProcessHandleImpl implements ProcessHandle {
/**
* Returns a ProcessHandle for an existing native process.
*
* @param pid the native process identifier
* @param pid the native process identifier
* @return The ProcessHandle for the pid if the process is alive;
* or {@code null} if the process ID does not exist in the native system.
* or {@code null} if the process ID does not exist in the native system.
* @throws SecurityException if RuntimePermission("manageProcess") is not granted
*/
static Optional<ProcessHandle> get(long pid) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2018, 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
@ -331,7 +331,7 @@ public class SecurityManager {
* security manager.
* This may result in throwing a <code>SecurityException</code>.
*
* @exception java.lang.SecurityException if a security manager already
* @throws java.lang.SecurityException if a security manager already
* exists and its <code>checkPermission</code> method
* doesn't allow creation of a new security manager.
* @see java.lang.System#getSecurityManager()
@ -398,9 +398,9 @@ public class SecurityManager {
* with the given permission.
*
* @param perm the requested permission.
* @exception SecurityException if access is not permitted based on
* @throws SecurityException if access is not permitted based on
* the current security policy.
* @exception NullPointerException if the permission argument is
* @throws NullPointerException if the permission argument is
* <code>null</code>.
* @since 1.2
*/
@ -429,11 +429,11 @@ public class SecurityManager {
*
* @param perm the specified permission
* @param context a system-dependent security context.
* @exception SecurityException if the specified security context
* @throws SecurityException if the specified security context
* is not an instance of <code>AccessControlContext</code>
* (e.g., is <code>null</code>), or is denied access to the
* resource specified by the given permission.
* @exception NullPointerException if the permission argument is
* @throws NullPointerException if the permission argument is
* <code>null</code>.
* @see java.lang.SecurityManager#getSecurityContext()
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
@ -460,7 +460,7 @@ public class SecurityManager {
* at the point the overridden method would normally throw an
* exception.
*
* @exception SecurityException if the calling thread does not
* @throws SecurityException if the calling thread does not
* have permission
* to create a new class loader.
* @see java.lang.ClassLoader#ClassLoader()
@ -515,9 +515,9 @@ public class SecurityManager {
* equivalent security check should be placed in the overridden method.
*
* @param t the thread to be checked.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to modify the thread.
* @exception NullPointerException if the thread argument is
* @throws NullPointerException if the thread argument is
* <code>null</code>.
* @see java.lang.Thread#resume() resume
* @see java.lang.Thread#setDaemon(boolean) setDaemon
@ -568,9 +568,9 @@ public class SecurityManager {
* equivalent security check should be placed in the overridden method.
*
* @param g the thread group to be checked.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to modify the thread group.
* @exception NullPointerException if the thread group argument is
* @throws NullPointerException if the thread group argument is
* <code>null</code>.
* @see java.lang.ThreadGroup#destroy() destroy
* @see java.lang.ThreadGroup#resume() resume
@ -610,7 +610,7 @@ public class SecurityManager {
* exception.
*
* @param status the exit status.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to halt the Java Virtual Machine with
* the specified status.
* @see java.lang.Runtime#exit(int) exit
@ -639,9 +639,9 @@ public class SecurityManager {
* exception.
*
* @param cmd the specified system command.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to create a subprocess.
* @exception NullPointerException if the <code>cmd</code> argument is
* @throws NullPointerException if the <code>cmd</code> argument is
* <code>null</code>.
* @see java.lang.Runtime#exec(java.lang.String)
* @see java.lang.Runtime#exec(java.lang.String, java.lang.String[])
@ -679,9 +679,9 @@ public class SecurityManager {
* exception.
*
* @param lib the name of the library.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to dynamically link the library.
* @exception NullPointerException if the <code>lib</code> argument is
* @throws NullPointerException if the <code>lib</code> argument is
* <code>null</code>.
* @see java.lang.Runtime#load(java.lang.String)
* @see java.lang.Runtime#loadLibrary(java.lang.String)
@ -709,9 +709,9 @@ public class SecurityManager {
* exception.
*
* @param fd the system-dependent file descriptor.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to access the specified file descriptor.
* @exception NullPointerException if the file descriptor argument is
* @throws NullPointerException if the file descriptor argument is
* <code>null</code>.
* @see java.io.FileDescriptor
* @see #checkPermission(java.security.Permission) checkPermission
@ -737,9 +737,9 @@ public class SecurityManager {
* exception.
*
* @param file the system-dependent file name.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to access the specified file.
* @exception NullPointerException if the <code>file</code> argument is
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -769,11 +769,11 @@ public class SecurityManager {
*
* @param file the system-dependent filename.
* @param context a system-dependent security context.
* @exception SecurityException if the specified security context
* @throws SecurityException if the specified security context
* is not an instance of <code>AccessControlContext</code>
* (e.g., is <code>null</code>), or does not have permission
* to read the specified file.
* @exception NullPointerException if the <code>file</code> argument is
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @see java.lang.SecurityManager#getSecurityContext()
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
@ -799,9 +799,9 @@ public class SecurityManager {
* exception.
*
* @param fd the system-dependent file descriptor.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to access the specified file descriptor.
* @exception NullPointerException if the file descriptor argument is
* @throws NullPointerException if the file descriptor argument is
* <code>null</code>.
* @see java.io.FileDescriptor
* @see #checkPermission(java.security.Permission) checkPermission
@ -828,9 +828,9 @@ public class SecurityManager {
* exception.
*
* @param file the system-dependent filename.
* @exception SecurityException if the calling thread does not
* @throws SecurityException if the calling thread does not
* have permission to access the specified file.
* @exception NullPointerException if the <code>file</code> argument is
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -855,9 +855,9 @@ public class SecurityManager {
* exception.
*
* @param file the system-dependent filename.
* @exception SecurityException if the calling thread does not
* @throws SecurityException if the calling thread does not
* have permission to delete the file.
* @exception NullPointerException if the <code>file</code> argument is
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @see java.io.File#delete()
* @see #checkPermission(java.security.Permission) checkPermission
@ -889,10 +889,10 @@ public class SecurityManager {
*
* @param host the host name port to connect to.
* @param port the protocol port to connect to.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to open a socket connection to the specified
* <code>host</code> and <code>port</code>.
* @exception NullPointerException if the <code>host</code> argument is
* @throws NullPointerException if the <code>host</code> argument is
* <code>null</code>.
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -941,12 +941,12 @@ public class SecurityManager {
* @param host the host name port to connect to.
* @param port the protocol port to connect to.
* @param context a system-dependent security context.
* @exception SecurityException if the specified security context
* @throws SecurityException if the specified security context
* is not an instance of <code>AccessControlContext</code>
* (e.g., is <code>null</code>), or does not have permission
* to open a socket connection to the specified
* <code>host</code> and <code>port</code>.
* @exception NullPointerException if the <code>host</code> argument is
* @throws NullPointerException if the <code>host</code> argument is
* <code>null</code>.
* @see java.lang.SecurityManager#getSecurityContext()
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
@ -982,7 +982,7 @@ public class SecurityManager {
* exception.
*
* @param port the local port.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to listen on the specified port.
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -1009,9 +1009,9 @@ public class SecurityManager {
*
* @param host the host name of the socket connection.
* @param port the port number of the socket connection.
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to accept the connection.
* @exception NullPointerException if the <code>host</code> argument is
* @throws NullPointerException if the <code>host</code> argument is
* <code>null</code>.
* @see java.net.ServerSocket#accept()
* @see #checkPermission(java.security.Permission) checkPermission
@ -1042,9 +1042,9 @@ public class SecurityManager {
* exception.
*
* @param maddr Internet group address to be used.
* @exception SecurityException if the calling thread is not allowed to
* @throws SecurityException if the calling thread is not allowed to
* use (join/leave/send/receive) IP multicast.
* @exception NullPointerException if the address argument is
* @throws NullPointerException if the address argument is
* <code>null</code>.
* @since 1.1
* @see #checkPermission(java.security.Permission) checkPermission
@ -1076,9 +1076,9 @@ public class SecurityManager {
* @param ttl value in use, if it is multicast send.
* Note: this particular implementation does not use the ttl
* parameter.
* @exception SecurityException if the calling thread is not allowed to
* @throws SecurityException if the calling thread is not allowed to
* use (join/leave/send/receive) IP multicast.
* @exception NullPointerException if the address argument is
* @throws NullPointerException if the address argument is
* <code>null</code>.
* @since 1.1
* @deprecated Use #checkPermission(java.security.Permission) instead
@ -1110,7 +1110,7 @@ public class SecurityManager {
* at the point the overridden method would normally throw an
* exception.
*
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to access or modify the system properties.
* @see java.lang.System#getProperties()
* @see java.lang.System#setProperties(java.util.Properties)
@ -1139,11 +1139,11 @@ public class SecurityManager {
*
* @param key a system property key.
*
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to access the specified system property.
* @exception NullPointerException if the <code>key</code> argument is
* @throws NullPointerException if the <code>key</code> argument is
* <code>null</code>.
* @exception IllegalArgumentException if <code>key</code> is empty.
* @throws IllegalArgumentException if <code>key</code> is empty.
*
* @see java.lang.System#getProperty(java.lang.String)
* @see #checkPermission(java.security.Permission) checkPermission
@ -1166,7 +1166,7 @@ public class SecurityManager {
* at the point the overridden method would normally throw an
* exception.
*
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to initiate a print job request.
* @since 1.1
* @see #checkPermission(java.security.Permission) checkPermission
@ -1474,7 +1474,7 @@ public class SecurityManager {
* at the point the overridden method would normally throw an
* exception.
*
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission to specify a socket factory or a stream
* handler factory.
*
@ -1509,10 +1509,10 @@ public class SecurityManager {
*
* @param target the target name of the <code>SecurityPermission</code>.
*
* @exception SecurityException if the calling thread does not have
* @throws SecurityException if the calling thread does not have
* permission for the requested access.
* @exception NullPointerException if <code>target</code> is null.
* @exception IllegalArgumentException if <code>target</code> is empty.
* @throws NullPointerException if <code>target</code> is null.
* @throws IllegalArgumentException if <code>target</code> is empty.
*
* @since 1.1
* @see #checkPermission(java.security.Permission) checkPermission

View file

@ -702,7 +702,7 @@ public final class String
* @param index the index of the {@code char} value.
* @return the {@code char} value at the specified index of this string.
* The first {@code char} value is at index {@code 0}.
* @exception IndexOutOfBoundsException if the {@code index}
* @throws IndexOutOfBoundsException if the {@code index}
* argument is negative or not less than the length of this
* string.
*/
@ -731,7 +731,7 @@ public final class String
* @param index the index to the {@code char} values
* @return the code point value of the character at the
* {@code index}
* @exception IndexOutOfBoundsException if the {@code index}
* @throws IndexOutOfBoundsException if the {@code index}
* argument is negative or not less than the length of this
* string.
* @since 1.5
@ -763,7 +763,7 @@ public final class String
*
* @param index the index following the code point that should be returned
* @return the Unicode code point value before the given index.
* @exception IndexOutOfBoundsException if the {@code index}
* @throws IndexOutOfBoundsException if the {@code index}
* argument is less than 1 or greater than the length
* of this string.
* @since 1.5
@ -794,7 +794,7 @@ public final class String
* the text range.
* @return the number of Unicode code points in the specified text
* range
* @exception IndexOutOfBoundsException if the
* @throws IndexOutOfBoundsException if the
* {@code beginIndex} is negative, or {@code endIndex}
* is larger than the length of this {@code String}, or
* {@code beginIndex} is larger than {@code endIndex}.
@ -821,7 +821,7 @@ public final class String
* @param index the index to be offset
* @param codePointOffset the offset in code points
* @return the index within this {@code String}
* @exception IndexOutOfBoundsException if {@code index}
* @throws IndexOutOfBoundsException if {@code index}
* is negative or larger then the length of this
* {@code String}, or if {@code codePointOffset} is positive
* and the substring starting with {@code index} has fewer
@ -858,7 +858,7 @@ public final class String
* to copy.
* @param dst the destination array.
* @param dstBegin the start offset in the destination array.
* @exception IndexOutOfBoundsException If any of the following
* @throws IndexOutOfBoundsException If any of the following
* is true:
* <ul><li>{@code srcBegin} is negative.
* <li>{@code srcBegin} is greater than {@code srcEnd}
@ -1867,7 +1867,7 @@ public final class String
*
* @param beginIndex the beginning index, inclusive.
* @return the specified substring.
* @exception IndexOutOfBoundsException if
* @throws IndexOutOfBoundsException if
* {@code beginIndex} is negative or larger than the
* length of this {@code String} object.
*/
@ -1890,7 +1890,7 @@ public final class String
* @param beginIndex the beginning index, inclusive.
* @param endIndex the ending index, exclusive.
* @return the specified substring.
* @exception IndexOutOfBoundsException if the
* @throws IndexOutOfBoundsException if the
* {@code beginIndex} is negative, or
* {@code endIndex} is larger than the length of
* this {@code String} object, or
@ -3374,7 +3374,7 @@ public final class String
* @param count length of the subarray.
* @return a {@code String} that contains the characters of the
* specified subarray of the character array.
* @exception IndexOutOfBoundsException if {@code offset} is
* @throws IndexOutOfBoundsException if {@code offset} is
* negative, or {@code count} is negative, or
* {@code offset+count} is larger than
* {@code data.length}.
@ -3391,7 +3391,7 @@ public final class String
* @param count length of the subarray.
* @return a {@code String} that contains the characters of the
* specified subarray of the character array.
* @exception IndexOutOfBoundsException if {@code offset} is
* @throws IndexOutOfBoundsException if {@code offset} is
* negative, or {@code count} is negative, or
* {@code offset+count} is larger than
* {@code data.length}.

View file

@ -199,9 +199,9 @@ interface MethodHandleInfo {
* @param expected a class object representing the desired result type {@code T}
* @param lookup the lookup object that created this MethodHandleInfo, or one with equivalent access privileges
* @return a reference to the method, constructor, or field object
* @exception ClassCastException if the member is not of the expected type
* @exception NullPointerException if either argument is {@code null}
* @exception IllegalArgumentException if the underlying member is not accessible to the given lookup object
* @throws ClassCastException if the member is not of the expected type
* @throws NullPointerException if either argument is {@code null}
* @throws IllegalArgumentException if the underlying member is not accessible to the given lookup object
*/
public <T extends Member> T reflectAs(Class<T> expected, Lookup lookup);
@ -243,7 +243,7 @@ interface MethodHandleInfo {
* The conventional prefix "REF_" is omitted.
* @param referenceKind an integer code for a kind of reference used to access a class member
* @return a mixed-case string such as {@code "getField"}
* @exception IllegalArgumentException if the argument is not a valid
* @throws IllegalArgumentException if the argument is not a valid
* <a href="MethodHandleInfo.html#refkinds">reference kind number</a>
*/
public static String referenceKindToString(int referenceKind) {
@ -278,9 +278,9 @@ interface MethodHandleInfo {
* @param name the {@linkplain #getName member name} part of the symbolic reference
* @param type the {@linkplain #getMethodType method type} part of the symbolic reference
* @return a string of the form {@code "RK C.N:MT"}
* @exception IllegalArgumentException if the first argument is not a valid
* @throws IllegalArgumentException if the first argument is not a valid
* <a href="MethodHandleInfo.html#refkinds">reference kind number</a>
* @exception NullPointerException if any reference argument is {@code null}
* @throws NullPointerException if any reference argument is {@code null}
*/
public static String toString(int kind, Class<?> defc, String name, MethodType type) {
Objects.requireNonNull(name); Objects.requireNonNull(type);

View file

@ -274,10 +274,10 @@ public class MethodHandles {
* @param target a direct method handle to crack into symbolic reference components
* @param expected a class object representing the desired result type {@code T}
* @return a reference to the method, constructor, or field object
* @exception SecurityException if the caller is not privileged to call {@code setAccessible}
* @exception NullPointerException if either argument is {@code null}
* @exception IllegalArgumentException if the target is not a direct method handle
* @exception ClassCastException if the member is not of the expected type
* @throws SecurityException if the caller is not privileged to call {@code setAccessible}
* @throws NullPointerException if either argument is {@code null}
* @throws IllegalArgumentException if the target is not a direct method handle
* @throws ClassCastException if the member is not of the expected type
* @since 1.8
*/
public static <T extends Member> T
@ -1754,7 +1754,7 @@ assertEquals("[x, y]", MH_asList.invoke("x", "y").toString());
* or if the method is not {@code static},
* or if the method's variable arity modifier bit
* is set and {@code asVarargsCollector} fails
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
*/
@ -1839,7 +1839,7 @@ assertEquals("", (String) MH_newString.invokeExact());
* or if the method is {@code static},
* or if the method's variable arity modifier bit
* is set and {@code asVarargsCollector} fails
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
*/
@ -1913,7 +1913,7 @@ assertEquals("[x, y, z]", pb.command().toString());
* @throws IllegalAccessException if access checking fails
* or if the method's variable arity modifier bit
* is set and {@code asVarargsCollector} fails
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
*/
@ -1941,13 +1941,13 @@ assertEquals("[x, y, z]", pb.command().toString());
*
* @param targetName the fully qualified name of the class to be looked up.
* @return the requested class.
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws LinkageError if the linkage fails
* @throws ClassNotFoundException if the class cannot be loaded by the lookup class' loader.
* @throws IllegalAccessException if the class is not accessible, using the allowed access
* modes.
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
*
* @jls 12.2 Loading of Classes and Interfaces
@ -2022,7 +2022,7 @@ assertEquals("[x, y, z]", pb.command().toString());
* @return the class that has been access-checked
* @throws IllegalAccessException if the class is not accessible from the lookup class
* and previous lookup class, if present, using the allowed access modes.
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @since 9
* @see <a href="#cross-module-lookup">Cross-module lookups</a>
@ -2104,7 +2104,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
* or if the method is {@code static},
* or if the method's variable arity modifier bit
* is set and {@code asVarargsCollector} fails
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
*/
@ -2129,7 +2129,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
* @return a method handle which can load values from the field
* @throws NoSuchFieldException if the field does not exist
* @throws IllegalAccessException if access checking fails, or if the field is {@code static}
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
* @see #findVarHandle(Class, String, Class)
@ -2153,7 +2153,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
* @throws NoSuchFieldException if the field does not exist
* @throws IllegalAccessException if access checking fails, or if the field is {@code static}
* or {@code final}
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
* @see #findVarHandle(Class, String, Class)
@ -2226,7 +2226,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
* @return a VarHandle giving access to non-static fields.
* @throws NoSuchFieldException if the field does not exist
* @throws IllegalAccessException if access checking fails, or if the field is {@code static}
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
* @since 9
@ -2252,7 +2252,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
* @return a method handle which can load values from the field
* @throws NoSuchFieldException if the field does not exist
* @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
*/
@ -2277,7 +2277,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
* @throws NoSuchFieldException if the field does not exist
* @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
* or is {@code final}
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
*/
@ -2351,7 +2351,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
* @return a VarHandle giving access to a static field
* @throws NoSuchFieldException if the field does not exist
* @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
* @since 9
@ -2405,7 +2405,7 @@ return mh1;
* @throws IllegalAccessException if access checking fails
* or if the method's variable arity modifier bit
* is set and {@code asVarargsCollector} fails
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if any argument is null
* @see MethodHandle#bindTo
@ -2707,10 +2707,10 @@ return mh1;
* and was created by a lookup object for a different class.
* @param target a direct method handle to crack into symbolic reference components
* @return a symbolic reference which can be used to reconstruct this method handle from this lookup object
* @exception SecurityException if a security manager is present and it
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws IllegalArgumentException if the target is not a direct method handle or if access checking fails
* @exception NullPointerException if the target is {@code null}
* @throws NullPointerException if the target is {@code null}
* @see MethodHandleInfo
* @since 1.8
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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
@ -139,4 +139,4 @@ final class VarForm {
}
return table;
}
}
}

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
@ -61,17 +61,17 @@ class Array {
* <p>The number of dimensions of the new array must not
* exceed 255.
*
* @param componentType the {@code Class} object representing the
* component type of the new array
* @param length the length of the new array
* @param componentType the {@code Class} object representing the
* component type of the new array
* @param length the length of the new array
* @return the new array
* @exception NullPointerException if the specified
* {@code componentType} parameter is null
* @exception IllegalArgumentException if componentType is {@link
* Void#TYPE} or if the number of dimensions of the requested array
* instance exceed 255.
* @exception NegativeArraySizeException if the specified {@code length}
* is negative
* @throws NullPointerException if the specified
* {@code componentType} parameter is null
* @throws IllegalArgumentException if componentType is {@link
* Void#TYPE} or if the number of dimensions of the requested array
* instance exceed 255.
* @throws NegativeArraySizeException if the specified {@code length}
* is negative
*/
public static Object newInstance(Class<?> componentType, int length)
throws NegativeArraySizeException {
@ -100,13 +100,13 @@ class Array {
* @param dimensions an array of {@code int} representing the dimensions of
* the new array
* @return the new array
* @exception NullPointerException if the specified
* @throws NullPointerException if the specified
* {@code componentType} argument is null
* @exception IllegalArgumentException if the specified {@code dimensions}
* @throws IllegalArgumentException if the specified {@code dimensions}
* argument is a zero-dimensional array, if componentType is {@link
* Void#TYPE}, or if the number of dimensions of the requested array
* instance exceed 255.
* @exception NegativeArraySizeException if any of the components in
* @throws NegativeArraySizeException if any of the components in
* the specified {@code dimensions} argument is negative.
*/
public static Object newInstance(Class<?> componentType, int... dimensions)
@ -119,7 +119,7 @@ class Array {
*
* @param array the array
* @return the length of the array
* @exception IllegalArgumentException if the object argument is not
* @throws IllegalArgumentException if the object argument is not
* an array
*/
@HotSpotIntrinsicCandidate
@ -135,10 +135,10 @@ class Array {
* @param index the index
* @return the (possibly wrapped) value of the indexed component in
* the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
*/
@ -152,11 +152,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -171,11 +171,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -190,11 +190,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -209,11 +209,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -228,11 +228,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -247,11 +247,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -266,11 +266,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -285,11 +285,11 @@ class Array {
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
* @exception NullPointerException If the specified object is null
* @exception IllegalArgumentException If the specified object is not
* @throws NullPointerException If the specified object is null
* @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@ -305,12 +305,12 @@ class Array {
* @param array the array
* @param index the index into the array
* @param value the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the array component type is primitive and
* an unwrapping conversion fails
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
*/
@ -323,13 +323,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param z the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@ -343,13 +343,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param b the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@ -363,13 +363,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param c the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@ -383,13 +383,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param s the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@ -403,13 +403,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param i the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@ -423,13 +423,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param l the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@ -443,13 +443,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param f the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@ -463,13 +463,13 @@ class Array {
* @param array the array
* @param index the index into the array
* @param d the new value of the indexed component
* @exception NullPointerException If the specified object argument
* @throws NullPointerException If the specified object argument
* is null
* @exception IllegalArgumentException If the specified object argument
* @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
* @exception ArrayIndexOutOfBoundsException If the specified {@code index}
* @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set

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
@ -454,21 +454,21 @@ public final class Constructor<T> extends Executable {
* @return a new object created by calling the constructor
* this object represents
*
* @exception IllegalAccessException if this {@code Constructor} object
* @throws IllegalAccessException if this {@code Constructor} object
* is enforcing Java language access control and the underlying
* constructor is inaccessible.
* @exception IllegalArgumentException if the number of actual
* @throws IllegalArgumentException if the number of actual
* and formal parameters differ; if an unwrapping
* conversion for primitive arguments fails; or if,
* after possible unwrapping, a parameter value
* cannot be converted to the corresponding formal
* parameter type by a method invocation conversion; if
* this constructor pertains to an enum type.
* @exception InstantiationException if the class that declares the
* @throws InstantiationException if the class that declares the
* underlying constructor represents an abstract class.
* @exception InvocationTargetException if the underlying constructor
* @throws InvocationTargetException if the underlying constructor
* throws an exception.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive

View file

@ -393,15 +393,15 @@ class Field extends AccessibleObject implements Member {
* {@code obj}; primitive values are wrapped in an appropriate
* object before being returned
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof).
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive
@ -423,18 +423,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the {@code boolean} field
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code boolean} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -457,18 +457,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the {@code byte} field
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code byte} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -493,18 +493,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the field converted to type {@code char}
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code char} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -529,18 +529,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the field converted to type {@code short}
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code short} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -565,18 +565,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the field converted to type {@code int}
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code int} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -601,18 +601,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the field converted to type {@code long}
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code long} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -637,18 +637,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the field converted to type {@code float}
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code float} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -673,18 +673,18 @@ class Field extends AccessibleObject implements Member {
* from
* @return the value of the field converted to type {@code double}
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
* @exception IllegalArgumentException if the specified object is not
* @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code double} by a
* widening conversion.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@ -754,16 +754,16 @@ class Field extends AccessibleObject implements Member {
* @param value the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive
@ -789,16 +789,16 @@ class Field extends AccessibleObject implements Member {
* @param z the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@ -825,16 +825,16 @@ class Field extends AccessibleObject implements Member {
* @param b the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@ -861,16 +861,16 @@ class Field extends AccessibleObject implements Member {
* @param c the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@ -897,16 +897,16 @@ class Field extends AccessibleObject implements Member {
* @param s the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@ -933,16 +933,16 @@ class Field extends AccessibleObject implements Member {
* @param i the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@ -969,16 +969,16 @@ class Field extends AccessibleObject implements Member {
* @param l the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@ -1005,16 +1005,16 @@ class Field extends AccessibleObject implements Member {
* @param f the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@ -1041,16 +1041,16 @@ class Field extends AccessibleObject implements Member {
* @param d the new value for the field of {@code obj}
* being modified
*
* @exception IllegalAccessException if this {@code Field} object
* @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
* @exception IllegalArgumentException if the specified object is not an
* @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the field is an instance field.
* @exception ExceptionInInitializerError if the initialization provoked
* @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/

View file

@ -524,10 +524,10 @@ public final class Method extends Executable {
* this object on {@code obj} with parameters
* {@code args}
*
* @exception IllegalAccessException if this {@code Method} object
* @throws IllegalAccessException if this {@code Method} object
* is enforcing Java language access control and the underlying
* method is inaccessible.
* @exception IllegalArgumentException if the method is an
* @throws IllegalArgumentException if the method is an
* instance method and the specified object argument
* is not an instance of the class or interface
* declaring the underlying method (or of a subclass
@ -537,11 +537,11 @@ public final class Method extends Executable {
* after possible unwrapping, a parameter value
* cannot be converted to the corresponding formal
* parameter type by a method invocation conversion.
* @exception InvocationTargetException if the underlying method
* @throws InvocationTargetException if the underlying method
* throws an exception.
* @exception NullPointerException if the specified object is null
* @throws NullPointerException if the specified object is null
* and the method is an instance method.
* @exception ExceptionInInitializerError if the initialization
* @throws ExceptionInInitializerError if the initialization
* provoked by this method fails.
*/
@CallerSensitive

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
@ -90,7 +90,7 @@ public abstract class ContentHandler {
*
* @param urlc a URL connection.
* @return the object read by the {@code ContentHandler}.
* @exception IOException if an I/O error occurs while reading the object.
* @throws IOException if an I/O error occurs while reading the object.
*/
public abstract Object getContent(URLConnection urlc) throws IOException;
@ -108,7 +108,7 @@ public abstract class ContentHandler {
* @return the object read by the {@code ContentHandler} that is
* the first match of the suggested types or
* {@code null} if none of the requested are supported.
* @exception IOException if an I/O error occurs while reading the object.
* @throws IOException if an I/O error occurs while reading the object.
* @since 1.3
*/
@SuppressWarnings("rawtypes")

View file

@ -245,7 +245,7 @@ class DatagramPacket {
* @param length the length of the data
* and/or the length of the buffer used to receive data
*
* @exception NullPointerException if the argument is null
* @throws NullPointerException if the argument is null
*
* @see #getData
* @see #getOffset
@ -331,7 +331,7 @@ class DatagramPacket {
*
* @param buf the buffer to set for this packet.
*
* @exception NullPointerException if the argument is null.
* @throws NullPointerException if the argument is null.
*
* @see #getLength
* @see #getData
@ -357,7 +357,7 @@ class DatagramPacket {
*
* @param length the length to set for this packet.
*
* @exception IllegalArgumentException if the length is negative
* @throws IllegalArgumentException if the length is negative
* of if the length is greater than the packet's data buffer
* length.
*

View file

@ -188,9 +188,9 @@ class DatagramSocket implements java.io.Closeable {
* with 0 as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @exception SocketException if the socket could not be opened,
* @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@ -229,9 +229,9 @@ class DatagramSocket implements java.io.Closeable {
* @param bindaddr local socket address to bind, or {@code null}
* for an unbound socket.
*
* @exception SocketException if the socket could not be opened,
* @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@ -263,9 +263,9 @@ class DatagramSocket implements java.io.Closeable {
* This could result in a SecurityException.
*
* @param port port to use.
* @exception SocketException if the socket could not be opened,
* @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@ -290,9 +290,9 @@ class DatagramSocket implements java.io.Closeable {
* @param port local port to use
* @param laddr local address to bind
*
* @exception SocketException if the socket could not be opened,
* @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@ -635,17 +635,17 @@ class DatagramSocket implements java.io.Closeable {
*
* @param p the {@code DatagramPacket} to be sent.
*
* @exception IOException if an I/O error occurs.
* @exception SecurityException if a security manager exists and its
* @throws IOException if an I/O error occurs.
* @throws SecurityException if a security manager exists and its
* {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
* @exception PortUnreachableException may be thrown if the socket is connected
* @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no
* guarantee that the exception will be thrown.
* @exception java.nio.channels.IllegalBlockingModeException
* @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
* and the channel is in non-blocking mode.
* @exception IllegalArgumentException if the socket is connected,
* @throws IllegalArgumentException if the socket is connected,
* and connected address and packet address differ.
*
* @see java.net.DatagramPacket
@ -714,13 +714,13 @@ class DatagramSocket implements java.io.Closeable {
*
* @param p the {@code DatagramPacket} into which to place
* the incoming data.
* @exception IOException if an I/O error occurs.
* @exception SocketTimeoutException if setSoTimeout was previously called
* @throws IOException if an I/O error occurs.
* @throws SocketTimeoutException if setSoTimeout was previously called
* and the timeout has expired.
* @exception PortUnreachableException may be thrown if the socket is connected
* @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
* @exception java.nio.channels.IllegalBlockingModeException
* @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
* and the channel is in non-blocking mode.
* @see java.net.DatagramPacket
@ -951,9 +951,9 @@ class DatagramSocket implements java.io.Closeable {
* @param size the size to which to set the send buffer
* size. This value must be greater than 0.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @exception IllegalArgumentException if the value is 0 or is
* @throws IllegalArgumentException if the value is 0 or is
* negative.
* @see #getSendBufferSize()
*/
@ -972,7 +972,7 @@ class DatagramSocket implements java.io.Closeable {
* buffer size used by the platform for output on this {@code DatagramSocket}.
*
* @return the value of the SO_SNDBUF option for this {@code DatagramSocket}
* @exception SocketException if there is an error in
* @throws SocketException if there is an error in
* the underlying protocol, such as an UDP error.
* @see #setSendBufferSize
*/
@ -1009,9 +1009,9 @@ class DatagramSocket implements java.io.Closeable {
* @param size the size to which to set the receive buffer
* size. This value must be greater than 0.
*
* @exception SocketException if there is an error in
* @throws SocketException if there is an error in
* the underlying protocol, such as an UDP error.
* @exception IllegalArgumentException if the value is 0 or is
* @throws IllegalArgumentException if the value is 0 or is
* negative.
* @see #getReceiveBufferSize()
*/
@ -1030,7 +1030,7 @@ class DatagramSocket implements java.io.Closeable {
* buffer size used by the platform for input on this {@code DatagramSocket}.
*
* @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
* @exception SocketException if there is an error in the underlying protocol, such as an UDP error.
* @throws SocketException if there is an error in the underlying protocol, such as an UDP error.
* @see #setReceiveBufferSize(int)
*/
public synchronized int getReceiveBufferSize()
@ -1070,7 +1070,7 @@ class DatagramSocket implements java.io.Closeable {
* is not defined.
*
* @param on whether to enable or disable the
* @exception SocketException if an error occurs enabling or
* @throws SocketException if an error occurs enabling or
* disabling the {@code SO_REUSEADDR} socket option,
* or the socket is closed.
* @since 1.4
@ -1093,7 +1093,7 @@ class DatagramSocket implements java.io.Closeable {
* Tests if SO_REUSEADDR is enabled.
*
* @return a {@code boolean} indicating whether or not SO_REUSEADDR is enabled.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
* @see #setReuseAddress(boolean)
@ -1131,7 +1131,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Tests if SO_BROADCAST is enabled.
* @return a {@code boolean} indicating whether or not SO_BROADCAST is enabled.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
* @see #setBroadcast(boolean)
@ -1290,10 +1290,10 @@ class DatagramSocket implements java.io.Closeable {
* This could result in a SecurityException.
*
* @param fac the desired factory.
* @exception IOException if an I/O error occurs when setting the
* @throws IOException if an I/O error occurs when setting the
* datagram socket factory.
* @exception SocketException if the factory is already defined.
* @exception SecurityException if a security manager exists and its
* @throws SocketException if the factory is already defined.
* @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
* @see SecurityManager#checkSetFactory

View file

@ -70,29 +70,29 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Creates a datagram socket.
* @exception SocketException if there is an error in the
* @throws SocketException if there is an error in the
* underlying protocol, such as a TCP error.
*/
protected abstract void create() throws SocketException;
/**
* Binds a datagram socket to a local port and address.
* @param lport the local port
* @param laddr the local address
* @exception SocketException if there is an error in the
* underlying protocol, such as a TCP error.
* @param lport the local port
* @param laddr the local address
* @throws SocketException if there is an error in the
* underlying protocol, such as a TCP error.
*/
protected abstract void bind(int lport, InetAddress laddr) throws SocketException;
/**
* Sends a datagram packet. The packet contains the data and the
* destination address to send the packet to.
* @param p the packet to be sent.
* @exception IOException if an I/O exception occurs while sending the
* datagram packet.
* @exception PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that
* the exception will be thrown.
* @param p the packet to be sent.
* @throws IOException if an I/O exception occurs while sending the
* datagram packet.
* @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that
* the exception will be thrown.
*/
protected abstract void send(DatagramPacket p) throws IOException;
@ -107,11 +107,11 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* packet has been received for that address, then a subsequent call to
* send or receive may throw a PortUnreachableException.
* Note, there is no guarantee that the exception will be thrown.
* @param address the remote InetAddress to connect to
* @param port the remote port number
* @exception SocketException may be thrown if the socket cannot be
* connected to the remote destination
* @since 1.4
* @param address the remote InetAddress to connect to
* @param port the remote port number
* @throws SocketException may be thrown if the socket cannot be
* connected to the remote destination
* @since 1.4
*/
protected void connect(InetAddress address, int port) throws SocketException {}
@ -124,12 +124,12 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
* to the address which the packet came from.
* @param i an InetAddress object
* @return the port number which the packet came from.
* @exception IOException if an I/O exception occurs
* @exception PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
* @param i an InetAddress object
* @return the port number which the packet came from.
* @throws IOException if an I/O exception occurs
* @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
*/
protected abstract int peek(InetAddress i) throws IOException;
@ -138,23 +138,23 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* {@code DatagramPacket}. The data is returned,
* but not consumed, so that a subsequent peekData/receive operation
* will see the same data.
* @param p the Packet Received.
* @return the port number which the packet came from.
* @exception IOException if an I/O exception occurs
* @exception PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
* @param p the Packet Received.
* @return the port number which the packet came from.
* @throws IOException if an I/O exception occurs
* @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
* @since 1.4
*/
protected abstract int peekData(DatagramPacket p) throws IOException;
/**
* Receive the datagram packet.
* @param p the Packet Received.
* @exception IOException if an I/O exception occurs
* while receiving the datagram packet.
* @exception PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
* @param p the Packet Received.
* @throws IOException if an I/O exception occurs
* while receiving the datagram packet.
* @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
*/
protected abstract void receive(DatagramPacket p) throws IOException;
@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* @param ttl a byte specifying the TTL value
*
* @deprecated use setTimeToLive instead.
* @exception IOException if an I/O exception occurs while setting
* @throws IOException if an I/O exception occurs while setting
* the time-to-live option.
* @see #getTTL()
*/
@ -173,7 +173,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Retrieve the TTL (time-to-live) option.
*
* @exception IOException if an I/O exception occurs
* @throws IOException if an I/O exception occurs
* while retrieving the time-to-live option
* @deprecated use getTimeToLive instead.
* @return a byte representing the TTL value
@ -185,7 +185,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Set the TTL (time-to-live) option.
* @param ttl an {@code int} specifying the time-to-live value
* @exception IOException if an I/O exception occurs
* @throws IOException if an I/O exception occurs
* while setting the time-to-live option.
* @see #getTimeToLive()
*/
@ -193,7 +193,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Retrieve the TTL (time-to-live) option.
* @exception IOException if an I/O exception occurs
* @throws IOException if an I/O exception occurs
* while retrieving the time-to-live option
* @return an {@code int} representing the time-to-live value
* @see #setTimeToLive(int)
@ -203,7 +203,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Join the multicast group.
* @param inetaddr multicast address to join.
* @exception IOException if an I/O exception occurs
* @throws IOException if an I/O exception occurs
* while joining the multicast group.
*/
protected abstract void join(InetAddress inetaddr) throws IOException;
@ -211,7 +211,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Leave the multicast group.
* @param inetaddr multicast address to leave.
* @exception IOException if an I/O exception occurs
* @throws IOException if an I/O exception occurs
* while leaving the multicast group.
*/
protected abstract void leave(InetAddress inetaddr) throws IOException;
@ -272,9 +272,9 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* UnsupportedOperationException}. Subclasses should override this method
* with an appropriate implementation.
*
* @param <T> The type of the socket option value
* @param name The socket option
* @param value The value of the socket option. A value of {@code null}
* @param <T> The type of the socket option value
* @param name The socket option
* @param value The value of the socket option. A value of {@code null}
* may be valid for some options.
*
* @throws UnsupportedOperationException if the DatagramSocketImpl does not
@ -300,8 +300,8 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* UnsupportedOperationException}. Subclasses should override this method
* with an appropriate implementation.
*
* @param <T> The type of the socket option value
* @param name The socket option
* @param <T> The type of the socket option value
* @param name The socket option
* @return the socket option
*
* @throws UnsupportedOperationException if the DatagramSocketImpl does not

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
@ -381,7 +381,7 @@ public abstract class HttpURLConnection extends URLConnection {
*
* @param set a {@code boolean} indicating whether or not
* to follow HTTP redirects.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't
* allow the operation.
* @see SecurityManager#checkSetFactory
@ -456,9 +456,9 @@ public abstract class HttpURLConnection extends URLConnection {
* method is GET.
*
* @param method the HTTP method
* @exception ProtocolException if the method cannot be reset or if
* @throws ProtocolException if the method cannot be reset or if
* the requested method isn't valid for HTTP.
* @exception SecurityException if a security manager is set and the
* @throws SecurityException if a security manager is set and the
* method is "TRACE", but the "allowHttpTrace"
* NetPermission is not granted.
* @see #getRequestMethod()
@ -627,7 +627,7 @@ public abstract class HttpURLConnection extends URLConnection {
* Returns a {@link SocketPermission} object representing the
* permission necessary to connect to the destination host and port.
*
* @exception IOException if an error occurs while computing
* @throws IOException if an error occurs while computing
* the permission.
*
* @return a {@code SocketPermission} object representing the

View file

@ -1161,7 +1161,7 @@ class InetAddress implements java.io.Serializable {
* @param host the specified host
* @param addr the raw IP address in network byte order
* @return an InetAddress object created from the raw IP address.
* @exception UnknownHostException if IP address is of illegal length
* @throws UnknownHostException if IP address is of illegal length
* @since 1.4
*/
public static InetAddress getByAddress(String host, byte[] addr)
@ -1216,10 +1216,10 @@ class InetAddress implements java.io.Serializable {
*
* @param host the specified host, or {@code null}.
* @return an IP address for the given host name.
* @exception UnknownHostException if no IP address for the
* @throws UnknownHostException if no IP address for the
* {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists
* @throws SecurityException if a security manager exists
* and its checkConnect method doesn't allow the operation
*/
public static InetAddress getByName(String host)
@ -1264,10 +1264,10 @@ class InetAddress implements java.io.Serializable {
* @param host the name of the host, or {@code null}.
* @return an array of all the IP addresses for a given host name.
*
* @exception UnknownHostException if no IP address for the
* @throws UnknownHostException if no IP address for the
* {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
*
* @see SecurityManager#checkConnect
@ -1542,7 +1542,7 @@ class InetAddress implements java.io.Serializable {
*
* @param addr the raw IP address in network byte order
* @return an InetAddress object created from the raw IP address.
* @exception UnknownHostException if IP address is of illegal length
* @throws UnknownHostException if IP address is of illegal length
* @since 1.4
*/
public static InetAddress getByAddress(byte[] addr)
@ -1580,7 +1580,7 @@ class InetAddress implements java.io.Serializable {
*
* @return the address of the local host.
*
* @exception UnknownHostException if the local host name could not
* @throws UnknownHostException if the local host name could not
* be resolved into an address.
*
* @see SecurityManager#checkConnect

View file

@ -217,7 +217,7 @@ public abstract class JarURLConnection extends URLConnection {
* a connection to an entry of a JAR file, the JAR file object is
* returned
*
* @exception IOException if an IOException occurs while trying to
* @throws IOException if an IOException occurs while trying to
* connect to the JAR file for this connection.
*
* @see #connect
@ -230,7 +230,7 @@ public abstract class JarURLConnection extends URLConnection {
* @return the manifest object corresponding to the JAR file object
* for this connection.
*
* @exception IOException if getting the JAR file for this
* @throws IOException if getting the JAR file for this
* connection causes an IOException to be thrown.
*
* @see #getJarFile
@ -247,7 +247,7 @@ public abstract class JarURLConnection extends URLConnection {
* @return the JAR entry object for this connection, or null if
* the JAR URL for this connection points to a JAR file.
*
* @exception IOException if getting the JAR file for this
* @throws IOException if getting the JAR file for this
* connection causes an IOException to be thrown.
*
* @see #getJarFile
@ -264,7 +264,7 @@ public abstract class JarURLConnection extends URLConnection {
* @return the Attributes object for this connection if the URL
* for it points to a JAR file entry, null otherwise.
*
* @exception IOException if getting the JAR entry causes an
* @throws IOException if getting the JAR entry causes an
* IOException to be thrown.
*
* @see #getJarEntry
@ -281,7 +281,7 @@ public abstract class JarURLConnection extends URLConnection {
* @return the main Attributes for the JAR file for this
* connection.
*
* @exception IOException if getting the manifest causes an
* @throws IOException if getting the manifest causes an
* IOException to be thrown.
*
* @see #getJarFile
@ -303,7 +303,7 @@ public abstract class JarURLConnection extends URLConnection {
* @return the Certificate object for this connection if the URL
* for it points to a JAR file entry, null otherwise.
*
* @exception IOException if getting the JAR entry causes an
* @throws IOException if getting the JAR entry causes an
* IOException to be thrown.
*
* @see #getJarEntry

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2016, 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
@ -103,9 +103,9 @@ class MulticastSocket extends DatagramSocket {
* {@link DatagramSocket#setReuseAddress(boolean)} method is called to
* enable the SO_REUSEADDR socket option.
*
* @exception IOException if an I/O exception occurs while creating the
* @throws IOException if an I/O exception occurs while creating the
* MulticastSocket
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
@ -128,13 +128,13 @@ class MulticastSocket extends DatagramSocket {
* {@link DatagramSocket#setReuseAddress(boolean)} method is
* called to enable the SO_REUSEADDR socket option.
*
* @param port port to use
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
* @param port port to use
* @throws IOException if an I/O exception occurs
* while creating the MulticastSocket
* @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*/
public MulticastSocket(int port) throws IOException {
this(new InetSocketAddress(port));
@ -154,14 +154,14 @@ class MulticastSocket extends DatagramSocket {
* {@link DatagramSocket#setReuseAddress(boolean)} method is
* called to enable the SO_REUSEADDR socket option.
*
* @param bindaddr Socket address to bind to, or {@code null} for
* an unbound socket.
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
* @param bindaddr Socket address to bind to, or {@code null} for
* an unbound socket.
* @throws IOException if an I/O exception occurs
* while creating the MulticastSocket
* @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*
* @since 1.4
*/
@ -208,11 +208,11 @@ class MulticastSocket extends DatagramSocket {
* <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be
* in the range {@code 0 <= ttl <= 0xFF }.
*
* @param ttl the time-to-live
* @exception IOException if an I/O exception occurs
* while setting the default time-to-live value
* @param ttl the time-to-live
* @throws IOException if an I/O exception occurs
* while setting the default time-to-live value
* @deprecated use the setTimeToLive method instead, which uses
* <b>int</b> instead of <b>byte</b> as the type for ttl.
* <b>int</b> instead of <b>byte</b> as the type for ttl.
* @see #getTTL()
*/
@Deprecated
@ -254,7 +254,7 @@ class MulticastSocket extends DatagramSocket {
* Get the default time-to-live for multicast packets sent out on
* the socket.
*
* @exception IOException if an I/O exception occurs
* @throws IOException if an I/O exception occurs
* while getting the default time-to-live value
* @return the default time-to-live value
* @deprecated use the getTimeToLive method instead, which returns
@ -271,7 +271,7 @@ class MulticastSocket extends DatagramSocket {
/**
* Get the default time-to-live for multicast packets sent out on
* the socket.
* @exception IOException if an I/O exception occurs while
* @throws IOException if an I/O exception occurs while
* getting the default time-to-live value
* @return the default time-to-live value
* @see #setTimeToLive(int)
@ -293,10 +293,10 @@ class MulticastSocket extends DatagramSocket {
*
* @param mcastaddr is the multicast address to join
*
* @exception IOException if there is an error joining, or when the address
* @throws IOException if there is an error joining, or when the address
* is not a multicast address, or the platform does not support
* multicasting
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the join.
*
* @see SecurityManager#checkMulticast(InetAddress)
@ -339,9 +339,9 @@ class MulticastSocket extends DatagramSocket {
* as its argument.
*
* @param mcastaddr is the multicast address to leave
* @exception IOException if there is an error leaving
* @throws IOException if there is an error leaving
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the operation.
*
* @see SecurityManager#checkMulticast(InetAddress)
@ -378,10 +378,10 @@ class MulticastSocket extends DatagramSocket {
* {@link MulticastSocket#setInterface(InetAddress)} or
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
*
* @exception IOException if there is an error joining, or when the address
* @throws IOException if there is an error joining, or when the address
* is not a multicast address, or the platform does not support
* multicasting
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the join.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
@ -426,9 +426,9 @@ class MulticastSocket extends DatagramSocket {
* to the interface set by
* {@link MulticastSocket#setInterface(InetAddress)} or
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
* @exception IOException if there is an error leaving
* @throws IOException if there is an error leaving
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the operation.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
@ -465,7 +465,7 @@ class MulticastSocket extends DatagramSocket {
* whose behavior would be affected by the value of the
* network interface. Useful for multihomed hosts.
* @param inf the InetAddress
* @exception SocketException if there is an error in
* @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
* @see #getInterface()
*/
@ -489,7 +489,7 @@ class MulticastSocket extends DatagramSocket {
* the address of the network interface used for
* multicast packets.
*
* @exception SocketException if there is an error in
* @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
*
* @see #setInterface(java.net.InetAddress)
@ -549,7 +549,7 @@ class MulticastSocket extends DatagramSocket {
* sent on this socket.
*
* @param netIf the interface
* @exception SocketException if there is an error in
* @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
* @see #getNetworkInterface()
* @since 1.4
@ -567,7 +567,7 @@ class MulticastSocket extends DatagramSocket {
/**
* Get the multicast network interface set.
*
* @exception SocketException if there is an error in
* @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
* @return the multicast {@code NetworkInterface} currently set
* @see #setNetworkInterface(NetworkInterface)
@ -643,9 +643,9 @@ class MulticastSocket extends DatagramSocket {
* @param ttl optional time to live for multicast packet.
* default ttl is 1.
*
* @exception IOException is raised if an error occurs i.e
* @throws IOException is raised if an error occurs i.e
* error while setting ttl.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
*

View file

@ -341,7 +341,7 @@ public final class NetworkInterface {
* {@link #getInetAddresses()} to obtain all IP addresses for this node
*
* @return an Enumeration of NetworkInterfaces found on this machine
* @exception SocketException if an I/O error occurs,
* @throws SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @see #networkInterfaces()
@ -371,7 +371,7 @@ public final class NetworkInterface {
* }</pre>
*
* @return a Stream of NetworkInterfaces found on this machine
* @exception SocketException if an I/O error occurs,
* @throws SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @since 9
@ -450,7 +450,7 @@ public final class NetworkInterface {
* Returns whether a network interface is up and running.
*
* @return {@code true} if the interface is up and running.
* @exception SocketException if an I/O error occurs.
* @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@ -462,7 +462,7 @@ public final class NetworkInterface {
* Returns whether a network interface is a loopback interface.
*
* @return {@code true} if the interface is a loopback interface.
* @exception SocketException if an I/O error occurs.
* @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@ -477,7 +477,7 @@ public final class NetworkInterface {
*
* @return {@code true} if the interface is a point to point
* interface.
* @exception SocketException if an I/O error occurs.
* @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@ -489,7 +489,7 @@ public final class NetworkInterface {
* Returns whether a network interface supports multicasting or not.
*
* @return {@code true} if the interface supports Multicasting.
* @exception SocketException if an I/O error occurs.
* @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@ -508,7 +508,7 @@ public final class NetworkInterface {
* manager is set and the caller does not have the permission
* NetPermission("getNetworkInformation")
*
* @exception SocketException if an I/O error occurs.
* @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public byte[] getHardwareAddress() throws SocketException {
@ -535,7 +535,7 @@ public final class NetworkInterface {
* Returns the Maximum Transmission Unit (MTU) of this interface.
*
* @return the value of the MTU for that interface.
* @exception SocketException if an I/O error occurs.
* @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public int getMTU() throws SocketException {

View file

@ -85,10 +85,10 @@ public abstract class ProxySelector {
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}{@code ("getProxySelector")}
* @see #setDefault(ProxySelector)
* @return the system-wide {@code ProxySelector}
* @since 1.5
* {@link NetPermission}{@code ("getProxySelector")}
* @see #setDefault(ProxySelector)
* @return the system-wide {@code ProxySelector}
* @since 1.5
*/
public static ProxySelector getDefault() {
SecurityManager sm = System.getSecurityManager();
@ -108,7 +108,7 @@ public abstract class ProxySelector {
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}{@code ("setProxySelector")}
* {@link NetPermission}{@code ("setProxySelector")}
*
* @see #getDefault()
* @since 1.5
@ -163,7 +163,7 @@ public abstract class ProxySelector {
*
* @param ioe
* The I/O exception thrown when the connect failed.
* @throws IllegalArgumentException if either argument is null
* @throws IllegalArgumentException if either argument is null
*/
public abstract void connectFailed(URI uri, SocketAddress sa, IOException ioe);

View file

@ -83,7 +83,7 @@ class ServerSocket implements java.io.Closeable {
/**
* Creates an unbound server socket.
*
* @exception IOException IO error when opening the socket.
* @throws IOException IO error when opening the socket.
* @revised 1.4
*/
public ServerSocket() throws IOException {
@ -115,11 +115,11 @@ class ServerSocket implements java.io.Closeable {
* @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
*
* @exception IOException if an I/O error occurs when opening the socket.
* @exception SecurityException
* @throws IOException if an I/O error occurs when opening the socket.
* @throws SecurityException
* if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
*
@ -168,11 +168,11 @@ class ServerSocket implements java.io.Closeable {
* @param backlog requested maximum length of the queue of incoming
* connections.
*
* @exception IOException if an I/O error occurs when opening the socket.
* @exception SecurityException
* @throws IOException if an I/O error occurs when opening the socket.
* @throws SecurityException
* if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
*
@ -221,7 +221,7 @@ class ServerSocket implements java.io.Closeable {
* its {@code checkListen} method doesn't allow the operation.
*
* @throws IOException if an I/O error occurs when opening the socket.
* @exception IllegalArgumentException if the port parameter is outside
* @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
*
@ -474,13 +474,13 @@ class ServerSocket implements java.io.Closeable {
* of the {@linkplain Socket#setSocketImplFactory(SocketImplFactory)
* client socket implementation factory}, if one has been set.
*
* @exception IOException if an I/O error occurs when waiting for a
* @throws IOException if an I/O error occurs when waiting for a
* connection.
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkAccept} method doesn't allow the operation.
* @exception SocketTimeoutException if a timeout was previously set with setSoTimeout and
* @throws SocketTimeoutException if a timeout was previously set with setSoTimeout and
* the timeout has been reached.
* @exception java.nio.channels.IllegalBlockingModeException
* @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel, the channel is in
* non-blocking mode, and there is no connection ready to be
* accepted
@ -674,7 +674,7 @@ class ServerSocket implements java.io.Closeable {
* <p> If this socket has an associated channel then the channel is closed
* as well.
*
* @exception IOException if an I/O error occurs when closing the socket.
* @throws IOException if an I/O error occurs when closing the socket.
* @revised 1.4
* @spec JSR-51
*/
@ -763,7 +763,7 @@ class ServerSocket implements java.io.Closeable {
* Retrieve setting for {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}.
* 0 returns implies that the option is disabled (i.e., timeout of infinity).
* @return the {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT} value
* @exception IOException if an I/O error occurs
* @throws IOException if an I/O error occurs
* @since 1.1
* @see #setSoTimeout(int)
*/
@ -806,7 +806,7 @@ class ServerSocket implements java.io.Closeable {
* is not defined.
*
* @param on whether to enable or disable the socket option
* @exception SocketException if an error occurs enabling or
* @throws SocketException if an error occurs enabling or
* disabling the {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
* socket option, or the socket is closed.
* @since 1.4
@ -826,7 +826,7 @@ class ServerSocket implements java.io.Closeable {
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.4
* @see #setReuseAddress(boolean)
@ -885,10 +885,10 @@ class ServerSocket implements java.io.Closeable {
* This could result in a SecurityException.
*
* @param fac the desired factory.
* @exception IOException if an I/O error occurs when setting the
* @throws IOException if an I/O error occurs when setting the
* socket factory.
* @exception SocketException if the factory has already been defined.
* @exception SecurityException if a security manager exists and its
* @throws SocketException if the factory has already been defined.
* @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
@ -928,13 +928,13 @@ class ServerSocket implements java.io.Closeable {
* requested value but the TCP receive window in sockets accepted from
* this ServerSocket will be no larger than 64K bytes.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @param size the size to which to set the receive buffer
* size. This value must be greater than 0.
*
* @exception IllegalArgumentException if the
* @throws IllegalArgumentException if the
* value is 0 or is negative.
*
* @since 1.4
@ -958,7 +958,7 @@ class ServerSocket implements java.io.Closeable {
* calling {@link Socket#getReceiveBufferSize()}.
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
* option for this {@code Socket}.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
* @since 1.4

View file

@ -180,7 +180,7 @@ class Socket implements java.io.Closeable {
* @param impl an instance of a <B>SocketImpl</B>
* the subclass wishes to use on the Socket.
*
* @exception SocketException if there is an error in the underlying protocol,
* @throws SocketException if there is an error in the underlying protocol,
* such as a TCP error.
* @since 1.1
*/
@ -211,13 +211,13 @@ class Socket implements java.io.Closeable {
* @param host the host name, or {@code null} for the loopback address.
* @param port the port number.
*
* @exception UnknownHostException if the IP address of
* @throws UnknownHostException if the IP address of
* the host could not be determined.
*
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
* @throws IOException if an I/O error occurs when creating the socket.
* @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
@ -249,13 +249,13 @@ class Socket implements java.io.Closeable {
*
* @param address the IP address.
* @param port the port number.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
* @throws IOException if an I/O error occurs when creating the socket.
* @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
* @exception NullPointerException if {@code address} is null.
* @throws NullPointerException if {@code address} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@ -291,12 +291,12 @@ class Socket implements java.io.Closeable {
* {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to, or
* {@code zero} for a system selected free port.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
* @throws IOException if an I/O error occurs when creating the socket.
* @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the connection
* to the destination, or if its {@code checkListen} method
* doesn't allow the bind to the local port.
* @exception IllegalArgumentException if the port parameter or localPort
* @throws IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
* @see SecurityManager#checkConnect
@ -332,15 +332,15 @@ class Socket implements java.io.Closeable {
* {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to or
* {@code zero} for a system selected free port.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
* @throws IOException if an I/O error occurs when creating the socket.
* @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the connection
* to the destination, or if its {@code checkListen} method
* doesn't allow the bind to the local port.
* @exception IllegalArgumentException if the port parameter or localPort
* @throws IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
* @exception NullPointerException if {@code address} is null.
* @throws NullPointerException if {@code address} is null.
* @see SecurityManager#checkConnect
* @since 1.1
*/
@ -380,10 +380,10 @@ class Socket implements java.io.Closeable {
* @param port the port number.
* @param stream a {@code boolean} indicating whether this is
* a stream socket or a datagram socket.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
* @throws IOException if an I/O error occurs when creating the socket.
* @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
@ -423,13 +423,13 @@ class Socket implements java.io.Closeable {
* @param port the port number.
* @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
* @throws IOException if an I/O error occurs when creating the socket.
* @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
* @exception NullPointerException if {@code host} is null.
* @throws NullPointerException if {@code host} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@ -867,7 +867,7 @@ class Socket implements java.io.Closeable {
* will close the associated socket.
*
* @return an input stream for reading bytes from this socket.
* @exception IOException if an I/O error occurs when creating the
* @throws IOException if an I/O error occurs when creating the
* input stream, the socket is closed, the socket is
* not connected, or the socket input has been shutdown
* using {@link #shutdownInput()}
@ -942,7 +942,7 @@ class Socket implements java.io.Closeable {
* will close the associated socket.
*
* @return an output stream for writing bytes to this socket.
* @exception IOException if an I/O error occurs when creating the
* @throws IOException if an I/O error occurs when creating the
* output stream or if the socket is not connected.
* @revised 1.4
* @spec JSR-51
@ -1002,7 +1002,7 @@ class Socket implements java.io.Closeable {
* @param on {@code true} to enable TCP_NODELAY,
* {@code false} to disable.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @since 1.1
@ -1020,7 +1020,7 @@ class Socket implements java.io.Closeable {
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.1
* @see #setTcpNoDelay(boolean)
@ -1040,9 +1040,9 @@ class Socket implements java.io.Closeable {
*
* @param on whether or not to linger on.
* @param linger how long to linger for, if on is true.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @exception IllegalArgumentException if the linger value is negative.
* @throws IllegalArgumentException if the linger value is negative.
* @since 1.1
* @see #getSoLinger()
*/
@ -1069,7 +1069,7 @@ class Socket implements java.io.Closeable {
* The setting only affects socket close.
*
* @return the setting for {@link SocketOptions#SO_LINGER SO_LINGER}.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.1
* @see #setSoLinger(boolean, int)
@ -1091,7 +1091,7 @@ class Socket implements java.io.Closeable {
* sent after any preceding writes to the socket OutputStream
* and before any future writes to the OutputStream.
* @param data The byte of data to send
* @exception IOException if there is an error
* @throws IOException if there is an error
* sending the data.
* @since 1.4
*/
@ -1120,7 +1120,7 @@ class Socket implements java.io.Closeable {
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE},
* {@code false} to disable.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @since 1.4
@ -1139,7 +1139,7 @@ class Socket implements java.io.Closeable {
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE} is enabled.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.4
* @see #setOOBInline(boolean)
@ -1182,7 +1182,7 @@ class Socket implements java.io.Closeable {
* 0 returns implies that the option is disabled (i.e., timeout of infinity).
*
* @return the setting for {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @since 1.1
@ -1211,13 +1211,13 @@ class Socket implements java.io.Closeable {
* applications that want to verify what size the buffers were set to
* should call {@link #getSendBufferSize()}.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @param size the size to which to set the send buffer
* size. This value must be greater than 0.
*
* @exception IllegalArgumentException if the
* @throws IllegalArgumentException if the
* value is 0 or is negative.
*
* @see #getSendBufferSize()
@ -1240,7 +1240,7 @@ class Socket implements java.io.Closeable {
* @return the value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF}
* option for this {@code Socket}.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @see #setSendBufferSize(int)
@ -1287,10 +1287,10 @@ class Socket implements java.io.Closeable {
* @param size the size to which to set the receive buffer
* size. This value must be greater than 0.
*
* @exception IllegalArgumentException if the value is 0 or is
* @throws IllegalArgumentException if the value is 0 or is
* negative.
*
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @see #getReceiveBufferSize()
@ -1314,7 +1314,7 @@ class Socket implements java.io.Closeable {
*
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
* option for this {@code Socket}.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
* @since 1.2
@ -1335,7 +1335,7 @@ class Socket implements java.io.Closeable {
* Enable/disable {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE}.
*
* @param on whether or not to have socket keep alive turned on.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.3
* @see #getKeepAlive()
@ -1351,7 +1351,7 @@ class Socket implements java.io.Closeable {
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.3
* @see #setKeepAlive(boolean)
@ -1470,7 +1470,7 @@ class Socket implements java.io.Closeable {
* is not defined.
*
* @param on whether to enable or disable the socket option
* @exception SocketException if an error occurs enabling or
* @throws SocketException if an error occurs enabling or
* disabling the {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
* socket option, or the socket is closed.
* @since 1.4
@ -1490,7 +1490,7 @@ class Socket implements java.io.Closeable {
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
* @exception SocketException if there is an error
* @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.4
* @see #setReuseAddress(boolean)
@ -1518,7 +1518,7 @@ class Socket implements java.io.Closeable {
* <p> If this socket has an associated channel then the channel is closed
* as well.
*
* @exception IOException if an I/O error occurs when closing this socket.
* @throws IOException if an I/O error occurs when closing this socket.
* @revised 1.4
* @spec JSR-51
* @see #isClosed
@ -1542,7 +1542,7 @@ class Socket implements java.io.Closeable {
* socket, the stream's {@code available} method will return 0, and its
* {@code read} methods will return {@code -1} (end of stream).
*
* @exception IOException if an I/O error occurs when shutting down this
* @throws IOException if an I/O error occurs when shutting down this
* socket.
*
* @since 1.3
@ -1572,7 +1572,7 @@ class Socket implements java.io.Closeable {
* shutdownOutput() on the socket, the stream will throw
* an IOException.
*
* @exception IOException if an I/O error occurs when shutting down this
* @throws IOException if an I/O error occurs when shutting down this
* socket.
*
* @since 1.3
@ -1700,10 +1700,10 @@ class Socket implements java.io.Closeable {
* This could result in a SecurityException.
*
* @param fac the desired factory.
* @exception IOException if an I/O error occurs when setting the
* @throws IOException if an I/O error occurs when setting the
* socket factory.
* @exception SocketException if the factory is already defined.
* @exception SecurityException if a security manager exists and its
* @throws SocketException if the factory is already defined.
* @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory

View file

@ -114,7 +114,7 @@ public abstract class SocketImpl implements SocketOptions {
*
* @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
* @exception IOException if an I/O error occurs while creating the
* @throws IOException if an I/O error occurs while creating the
* socket.
*/
protected abstract void create(boolean stream) throws IOException;
@ -124,7 +124,7 @@ public abstract class SocketImpl implements SocketOptions {
*
* @param host the name of the remote host.
* @param port the port number.
* @exception IOException if an I/O error occurs when connecting to the
* @throws IOException if an I/O error occurs when connecting to the
* remote host.
*/
protected abstract void connect(String host, int port) throws IOException;
@ -134,7 +134,7 @@ public abstract class SocketImpl implements SocketOptions {
*
* @param address the IP address of the remote host.
* @param port the port number.
* @exception IOException if an I/O error occurs when attempting a
* @throws IOException if an I/O error occurs when attempting a
* connection.
*/
protected abstract void connect(InetAddress address, int port) throws IOException;
@ -146,7 +146,7 @@ public abstract class SocketImpl implements SocketOptions {
*
* @param address the Socket address of the remote host.
* @param timeout the timeout value, in milliseconds, or zero for no timeout.
* @exception IOException if an I/O error occurs when attempting a
* @throws IOException if an I/O error occurs when attempting a
* connection.
* @since 1.4
*/
@ -157,7 +157,7 @@ public abstract class SocketImpl implements SocketOptions {
*
* @param host an IP address that belongs to a local interface.
* @param port the port number.
* @exception IOException if an I/O error occurs when binding this socket.
* @throws IOException if an I/O error occurs when binding this socket.
*/
protected abstract void bind(InetAddress host, int port) throws IOException;
@ -168,7 +168,7 @@ public abstract class SocketImpl implements SocketOptions {
* connection is refused.
*
* @param backlog the maximum length of the queue.
* @exception IOException if an I/O error occurs when creating the queue.
* @throws IOException if an I/O error occurs when creating the queue.
*/
protected abstract void listen(int backlog) throws IOException;
@ -176,7 +176,7 @@ public abstract class SocketImpl implements SocketOptions {
* Accepts a connection.
*
* @param s the accepted connection.
* @exception IOException if an I/O error occurs when accepting the
* @throws IOException if an I/O error occurs when accepting the
* connection.
*/
protected abstract void accept(SocketImpl s) throws IOException;
@ -185,7 +185,7 @@ public abstract class SocketImpl implements SocketOptions {
* Returns an input stream for this socket.
*
* @return a stream for reading from this socket.
* @exception IOException if an I/O error occurs when creating the
* @throws IOException if an I/O error occurs when creating the
* input stream.
*/
protected abstract InputStream getInputStream() throws IOException;
@ -194,7 +194,7 @@ public abstract class SocketImpl implements SocketOptions {
* Returns an output stream for this socket.
*
* @return an output stream for writing to this socket.
* @exception IOException if an I/O error occurs when creating the
* @throws IOException if an I/O error occurs when creating the
* output stream.
*/
protected abstract OutputStream getOutputStream() throws IOException;
@ -205,7 +205,7 @@ public abstract class SocketImpl implements SocketOptions {
*
* @return the number of bytes that can be read from this socket
* without blocking.
* @exception IOException if an I/O error occurs when determining the
* @throws IOException if an I/O error occurs when determining the
* number of bytes available.
*/
protected abstract int available() throws IOException;
@ -213,7 +213,7 @@ public abstract class SocketImpl implements SocketOptions {
/**
* Closes this socket.
*
* @exception IOException if an I/O error occurs when closing this socket.
* @throws IOException if an I/O error occurs when closing this socket.
*/
protected abstract void close() throws IOException;
@ -235,7 +235,7 @@ public abstract class SocketImpl implements SocketOptions {
* socket, the stream's {@code available} method will return 0, and its
* {@code read} methods will return {@code -1} (end of stream).
*
* @exception IOException if an I/O error occurs when shutting down this
* @throws IOException if an I/O error occurs when shutting down this
* socket.
* @see java.net.Socket#shutdownOutput()
* @see java.net.Socket#close()
@ -255,7 +255,7 @@ public abstract class SocketImpl implements SocketOptions {
* shutdownOutput() on the socket, the stream will throw
* an IOException.
*
* @exception IOException if an I/O error occurs when shutting down this
* @throws IOException if an I/O error occurs when shutting down this
* socket.
* @see java.net.Socket#shutdownInput()
* @see java.net.Socket#close()
@ -313,7 +313,7 @@ public abstract class SocketImpl implements SocketOptions {
* Send one byte of urgent data on the socket.
* The byte to be sent is the low eight bits of the parameter
* @param data The byte of data to send
* @exception IOException if there is an error
* @throws IOException if there is an error
* sending the data.
* @since 1.4
*/

View file

@ -86,7 +86,7 @@ class SocketInputStream extends FileInputStream {
* @param timeout the read timeout in ms
* @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.
*/
private native int socketRead0(FileDescriptor fd,
byte b[], int off, int len,
@ -104,7 +104,7 @@ class SocketInputStream extends FileInputStream {
* @param timeout the read timeout in ms
* @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.
*/
private int socketRead(FileDescriptor fd,
byte b[], int off, int len,
@ -118,7 +118,7 @@ class SocketInputStream extends FileInputStream {
* @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 {
return read(b, 0, b.length);
@ -132,7 +132,7 @@ class SocketInputStream extends FileInputStream {
* @param length 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 length) throws IOException {
return read(b, off, length, impl.getTimeout());
@ -206,7 +206,7 @@ class SocketInputStream extends FileInputStream {
* Skips n bytes of input.
* @param numbytes the number of bytes to skip
* @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 numbytes) throws IOException {
if (numbytes <= 0) {

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
@ -81,11 +81,11 @@ public interface SocketOptions {
* Throws SocketException if the option is unrecognized,
* the socket is closed, or some low-level error occurred
* <BR>
* @param optID identifies the option
* @param value the parameter of the socket option
* @param optID identifies the option
* @param value the parameter of the socket option
* @throws SocketException if the option is unrecognized,
* the socket is closed, or some low-level error occurred
* @see #getOption(int)
* the socket is closed, or some low-level error occurred
* @see #getOption(int)
*/
public void
setOption(int optID, Object value) throws SocketException;
@ -116,7 +116,7 @@ public interface SocketOptions {
* }
* </PRE>
*
* @param optID an {@code int} identifying the option to fetch
* @param optID an {@code int} identifying the option to fetch
* @return the value of the option
* @throws SocketException if the socket is closed
* @throws SocketException if <I>optID</I> is unknown along the

View file

@ -79,7 +79,7 @@ class SocketOutputStream extends FileOutputStream {
* @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.
* @throws IOException If an I/O error has occurred.
*/
private native void socketWrite0(FileDescriptor fd, byte[] b, int off,
int len) throws IOException;
@ -90,7 +90,7 @@ class SocketOutputStream extends FileOutputStream {
* @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.
* @throws IOException If an I/O error has occurred.
*/
private void socketWrite(byte b[], int off, int len) throws IOException {
@ -120,7 +120,7 @@ class SocketOutputStream extends FileOutputStream {
/**
* Writes a byte to the socket.
* @param b the data to be written
* @exception IOException If an I/O error has occurred.
* @throws IOException If an I/O error has occurred.
*/
public void write(int b) throws IOException {
temp[0] = (byte)b;
@ -130,7 +130,7 @@ class SocketOutputStream extends FileOutputStream {
/**
* Writes the contents of the buffer <i>b</i> to the socket.
* @param b the data to be written
* @exception SocketException If an I/O error has occurred.
* @throws SocketException If an I/O error has occurred.
*/
public void write(byte b[]) throws IOException {
socketWrite(b, 0, b.length);
@ -142,7 +142,7 @@ class SocketOutputStream extends FileOutputStream {
* @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 SocketException If an I/O error has occurred.
* @throws SocketException If an I/O error has occurred.
*/
public void write(byte b[], int off, int len) throws IOException {
socketWrite(b, off, len);

View file

@ -1361,10 +1361,10 @@ final class SocketPermissionCollection 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
* SocketPermission
*
* @exception SecurityException - if this SocketPermissionCollection object
* @throws SecurityException - if this SocketPermissionCollection object
* has been marked readonly
*/
@Override

View file

@ -349,7 +349,7 @@ public final class URL implements java.io.Serializable {
* @param host the name of the host.
* @param port the port number on the host.
* @param file the file on the host
* @exception MalformedURLException if an unknown protocol or the port
* @throws MalformedURLException if an unknown protocol or the port
* is a negative number other than -1
* @see java.lang.System#getProperty(java.lang.String)
* @see java.net.URL#setURLStreamHandlerFactory(
@ -378,7 +378,7 @@ public final class URL implements java.io.Serializable {
* @param protocol the name of the protocol to use.
* @param host the name of the host.
* @param file the file on the host.
* @exception MalformedURLException if an unknown protocol is specified.
* @throws MalformedURLException if an unknown protocol is specified.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
* int, java.lang.String)
*/
@ -412,9 +412,9 @@ public final class URL implements java.io.Serializable {
* @param port the port number on the host.
* @param file the file on the host
* @param handler the stream handler for the URL.
* @exception MalformedURLException if an unknown protocol or the port
* @throws MalformedURLException if an unknown protocol or the port
is a negative number other than -1
* @exception SecurityException
* @throws SecurityException
* if a security manager exists and its
* {@code checkPermission} method doesn't allow
* specifying a stream handler explicitly.
@ -494,7 +494,7 @@ public final class URL implements java.io.Serializable {
* constructor with a {@code null} first argument.
*
* @param spec the {@code String} to parse as a URL.
* @exception MalformedURLException if no protocol is specified, or an
* @throws MalformedURLException if no protocol is specified, or an
* unknown protocol is found, or {@code spec} is {@code null},
* or the parsed URL fails to comply with the specific syntax
* of the associated protocol.
@ -543,7 +543,7 @@ public final class URL implements java.io.Serializable {
*
* @param context the context in which to parse the specification.
* @param spec the {@code String} to parse as a URL.
* @exception MalformedURLException if no protocol is specified, or an
* @throws MalformedURLException if no protocol is specified, or an
* unknown protocol is found, or {@code spec} is {@code null},
* or the parsed URL fails to comply with the specific syntax
* of the associated protocol.
@ -565,11 +565,11 @@ public final class URL implements java.io.Serializable {
* @param context the context in which to parse the specification.
* @param spec the {@code String} to parse as a URL.
* @param handler the stream handler for the URL.
* @exception MalformedURLException if no protocol is specified, or an
* @throws MalformedURLException if no protocol is specified, or an
* unknown protocol is found, or {@code spec} is {@code null},
* or the parsed URL fails to comply with the specific syntax
* of the associated protocol.
* @exception SecurityException
* @throws SecurityException
* if a security manager exists and its
* {@code checkPermission} method doesn't allow
* specifying a stream handler.
@ -1042,7 +1042,7 @@ public final class URL implements java.io.Serializable {
* to a URI. However, some URLs that are not strictly in compliance
* can not be converted to a URI.
*
* @exception URISyntaxException if this URL is not formatted strictly according to
* @throws URISyntaxException if this URL is not formatted strictly according to
* RFC2396 and cannot be converted to a URI.
*
* @return a URI instance equivalent to this URL.
@ -1082,7 +1082,7 @@ public final class URL implements java.io.Serializable {
*
* @return a {@link java.net.URLConnection URLConnection} linking
* to the URL.
* @exception IOException if an I/O exception occurs.
* @throws IOException if an I/O exception occurs.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
* int, java.lang.String)
*/
@ -1103,13 +1103,13 @@ public final class URL implements java.io.Serializable {
* will be made. If direct connection is desired,
* Proxy.NO_PROXY should be specified.
* @return a {@code URLConnection} to the URL.
* @exception IOException if an I/O exception occurs.
* @exception SecurityException if a security manager is present
* @throws IOException if an I/O exception occurs.
* @throws SecurityException if a security manager is present
* and the caller doesn't have permission to connect
* to the proxy.
* @exception IllegalArgumentException will be thrown if proxy is null,
* @throws IllegalArgumentException will be thrown if proxy is null,
* or proxy has the wrong type
* @exception UnsupportedOperationException if the subclass that
* @throws UnsupportedOperationException if the subclass that
* implements the protocol handler doesn't support
* this method.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
@ -1148,7 +1148,7 @@ public final class URL implements java.io.Serializable {
* </pre></blockquote>
*
* @return an input stream for reading from the URL connection.
* @exception IOException if an I/O exception occurs.
* @throws IOException if an I/O exception occurs.
* @see java.net.URL#openConnection()
* @see java.net.URLConnection#getInputStream()
*/
@ -1163,7 +1163,7 @@ public final class URL implements java.io.Serializable {
* </pre></blockquote>
*
* @return the contents of this URL.
* @exception IOException if an I/O exception occurs.
* @throws IOException if an I/O exception occurs.
* @see java.net.URLConnection#getContent()
*/
public final Object getContent() throws java.io.IOException {
@ -1180,7 +1180,7 @@ public final class URL implements java.io.Serializable {
* @return the content object of this URL that is the first match of
* the types specified in the classes array.
* null if none of the requested types are supported.
* @exception IOException if an I/O exception occurs.
* @throws IOException if an I/O exception occurs.
* @see java.net.URLConnection#getContent(Class[])
* @since 1.3
*/
@ -1208,8 +1208,8 @@ public final class URL implements java.io.Serializable {
* This could result in a SecurityException.
*
* @param fac the desired factory.
* @exception Error if the application has already set a factory.
* @exception SecurityException if a security manager exists and its
* @throws Error if the application has already set a factory.
* @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow
* the operation.
* @see java.net.URL#URL(java.lang.String, java.lang.String,

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -99,12 +99,12 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
* @param urls the URLs from which to load classes and resources
* @param parent the parent class loader for delegation
* @exception SecurityException if a security manager exists and its
* @param urls the URLs from which to load classes and resources
* @param parent the parent class loader for delegation
* @throws SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @exception NullPointerException if {@code urls} or any of its
* @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
@ -134,12 +134,12 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
* @param urls the URLs from which to load classes and resources
* @param urls the URLs from which to load classes and resources
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @exception NullPointerException if {@code urls} or any of its
* @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
@ -166,15 +166,15 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
* @param urls the URLs from which to load classes and resources
* @param parent the parent class loader for delegation
* @param factory the URLStreamHandlerFactory to use when creating URLs
* @param urls the URLs from which to load classes and resources
* @param parent the parent class loader for delegation
* @param factory the URLStreamHandlerFactory to use when creating URLs
*
* @exception SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @exception NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @throws SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent,
@ -326,13 +326,13 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* and errors are not caught. Calling close on an already closed
* loader has no effect.
*
* @exception IOException if closing any file opened by this class loader
* @throws IOException if closing any file opened by this class loader
* resulted in an IOException. Any such exceptions are caught internally.
* If only one is caught, then it is re-thrown. If more than one exception
* is caught, then the second and following exceptions are added
* as suppressed exceptions of the first one caught, which is then re-thrown.
*
* @exception SecurityException if a security manager is set, and it denies
* @throws SecurityException if a security manager is set, and it denies
* {@link RuntimePermission}{@code ("closeClassLoader")}
*
* @since 1.7
@ -401,11 +401,11 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* path. Any URLs referring to JAR files are loaded and opened as needed
* until the class is found.
*
* @param name the name of the class
* @return the resulting class
* @exception ClassNotFoundException if the class could not be found,
* @param name the name of the class
* @return the resulting class
* @throws ClassNotFoundException if the class could not be found,
* or if the loader is closed.
* @exception NullPointerException if {@code name} is {@code null}.
* @throws NullPointerException if {@code name} is {@code null}.
*/
protected Class<?> findClass(final String name)
throws ClassNotFoundException
@ -628,7 +628,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* on the URL search path having the specified name.
*
* @param name the resource name
* @exception IOException if an I/O exception occurs
* @throws IOException if an I/O exception occurs
* @return An {@code Enumeration} of {@code URL}s.
* If the loader is closed, the Enumeration contains no elements.
*/
@ -696,7 +696,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* If the protocol is not "file", then permission
* to connect to and accept connections from the URL's host is granted.
* @param codesource the codesource
* @exception NullPointerException if {@code codesource} is {@code null}.
* @throws NullPointerException if {@code codesource} is {@code null}.
* @return the permissions granted to the codesource
*/
protected PermissionCollection getPermissions(CodeSource codesource)
@ -776,7 +776,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
*
* @param urls the URLs to search for classes and resources
* @param parent the parent class loader for delegation
* @exception NullPointerException if {@code urls} or any of its
* @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @return the resulting class loader
*/
@ -803,7 +803,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* loading the class.
*
* @param urls the URLs to search for classes and resources
* @exception NullPointerException if {@code urls} or any of its
* @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @return the resulting class loader
*/

View file

@ -327,7 +327,7 @@ public abstract class URLConnection {
* This could result in a SecurityException.
*
* @param map the FileNameMap to be set
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFileNameMap()
@ -357,7 +357,7 @@ public abstract class URLConnection {
*
* @throws SocketTimeoutException if the timeout expires before
* the connection can be established
* @exception IOException if an I/O error occurs while opening the
* @throws IOException if an I/O error occurs while opening the
* connection.
* @see java.net.URLConnection#connected
* @see #getConnectTimeout()
@ -734,9 +734,9 @@ public abstract class URLConnection {
* @return the object fetched. The {@code instanceof} operator
* should be used to determine the specific kind of object
* returned.
* @exception IOException if an I/O error occurs while
* @throws IOException if an I/O error occurs while
* getting the content.
* @exception UnknownServiceException if the protocol does not support
* @throws UnknownServiceException if the protocol does not support
* the content type.
* @see java.net.ContentHandlerFactory#createContentHandler(java.lang.String)
* @see java.net.URLConnection#getContentType()
@ -760,9 +760,9 @@ public abstract class URLConnection {
* the requested types are supported.
* The {@code instanceof} operator should be used to
* determine the specific kind of object returned.
* @exception IOException if an I/O error occurs while
* @throws IOException if an I/O error occurs while
* getting the content.
* @exception UnknownServiceException if the protocol does not support
* @throws UnknownServiceException if the protocol does not support
* the content type.
* @see java.net.URLConnection#getContent()
* @see java.net.ContentHandlerFactory#createContentHandler(java.lang.String)
@ -813,7 +813,7 @@ public abstract class URLConnection {
* necessary to make the connection represented by this
* URLConnection.
*
* @exception IOException if the computation of the permission
* @throws IOException if the computation of the permission
* requires network or file I/O and an exception occurs while
* computing it.
*/
@ -829,9 +829,9 @@ public abstract class URLConnection {
* is available for read.
*
* @return an input stream that reads from this open connection.
* @exception IOException if an I/O error occurs while
* @throws IOException if an I/O error occurs while
* creating the input stream.
* @exception UnknownServiceException if the protocol does not support
* @throws UnknownServiceException if the protocol does not support
* input.
* @see #setReadTimeout(int)
* @see #getReadTimeout()
@ -844,9 +844,9 @@ public abstract class URLConnection {
* Returns an output stream that writes to this connection.
*
* @return an output stream that writes to this connection.
* @exception IOException if an I/O error occurs while
* @throws IOException if an I/O error occurs while
* creating the output stream.
* @exception UnknownServiceException if the protocol does not support
* @throws UnknownServiceException if the protocol does not support
* output.
*/
public OutputStream getOutputStream() throws IOException {
@ -1250,8 +1250,8 @@ public abstract class URLConnection {
* This could result in a SecurityException.
*
* @param fac the desired factory.
* @exception Error if the factory has already been defined.
* @exception SecurityException if a security manager exists and its
* @throws Error if the factory has already been defined.
* @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.ContentHandlerFactory
* @see java.net.URLConnection#getContent()
@ -1479,7 +1479,7 @@ public abstract class URLConnection {
* @param is an input stream that supports marks.
* @return a guess at the content type, or {@code null} if none
* can be determined.
* @exception IOException if an I/O error occurs while reading the
* @throws IOException if an I/O error occurs while reading the
* input stream.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#markSupported()

View file

@ -175,7 +175,7 @@ public final class URLPermission extends Permission {
*
* @param actions the actions string
*
* @exception IllegalArgumentException if url is invalid or if actions contains white-space.
* @throws IllegalArgumentException if url is invalid or if actions contains white-space.
*/
public URLPermission(String url, String actions) {
super(normalize(url));

View file

@ -66,7 +66,7 @@ public abstract class URLStreamHandler {
*
* @param u the URL that this connects to.
* @return a {@code URLConnection} object for the {@code URL}.
* @exception IOException if an I/O error occurs while opening the
* @throws IOException if an I/O error occurs while opening the
* connection.
*/
protected abstract URLConnection openConnection(URL u) throws IOException;
@ -91,11 +91,11 @@ public abstract class URLStreamHandler {
* If direct connection is desired, Proxy.NO_PROXY
* should be specified.
* @return a {@code URLConnection} object for the {@code URL}.
* @exception IOException if an I/O error occurs while opening the
* @throws IOException if an I/O error occurs while opening the
* connection.
* @exception IllegalArgumentException if either u or p is null,
* @throws IllegalArgumentException if either u or p is null,
* or p has the wrong type.
* @exception UnsupportedOperationException if the subclass that
* @throws UnsupportedOperationException if the subclass that
* implements the protocol doesn't support this method.
* @since 1.5
*/
@ -510,7 +510,7 @@ public abstract class URLStreamHandler {
* @param path the path component of the URL.
* @param query the query part for the URL.
* @param ref the reference.
* @exception SecurityException if the protocol handler of the URL is
* @throws SecurityException if the protocol handler of the URL is
* different from this one
* @since 1.3
*/
@ -539,7 +539,7 @@ public abstract class URLStreamHandler {
* @param port the port on the remote machine.
* @param file the file.
* @param ref the reference.
* @exception SecurityException if the protocol handler of the URL is
* @throws SecurityException if the protocol handler of the URL is
* different from this one
* @deprecated Use setURL(URL, String, String, int, String, String, String,
* String);

View file

@ -249,8 +249,8 @@ public abstract class Buffer {
* @param capacity
* The new buffer's capacity, in $type$s
*
* @throws IllegalArgumentException
* If the {@code capacity} is a negative integer
* @throws IllegalArgumentException
* If the {@code capacity} is a negative integer
*/
static IllegalArgumentException createCapacityException(int capacity) {
assert capacity < 0 : "capacity expected to be negative";

View file

@ -322,14 +322,14 @@ public abstract class MappedByteBuffer
* mapping modes. This method may or may not have an effect for
* implementation-specific mapping modes. </p>
*
* @param index
* The index of the first byte in the buffer region that is
* to be written back to storage; must be non-negative
* and less than limit()
* @param index
* The index of the first byte in the buffer region that is
* to be written back to storage; must be non-negative
* and less than limit()
*
* @param length
* The length of the region in bytes; must be non-negative
* and no larger than limit() - index
* @param length
* The length of the region in bytes; must be non-negative
* and no larger than limit() - index
*
* @throws IndexOutOfBoundsException
* if the preconditions on the index and length do not

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -162,10 +162,10 @@ public final class AccessControlContext {
* @param combiner the {@code DomainCombiner} to be associated
* with the provided {@code AccessControlContext}.
*
* @exception NullPointerException if the provided
* @throws NullPointerException if the provided
* {@code context} is {@code null}.
*
* @exception SecurityException if a security manager is installed and the
* @throws SecurityException if a security manager is installed and the
* caller does not have the "createAccessControlContext"
* {@link SecurityPermission}
* @since 1.3
@ -344,7 +344,7 @@ public final class AccessControlContext {
* {@code AccessControlContext}, or {@code null}
* if there is none.
*
* @exception SecurityException if a security manager is installed and
* @throws SecurityException if a security manager is installed and
* the caller does not have the "getDomainCombiner"
* {@link SecurityPermission}
* @since 1.3
@ -383,10 +383,10 @@ public final class AccessControlContext {
*
* @param perm the requested permission.
*
* @exception AccessControlException if the specified permission
* @throws AccessControlException if the specified permission
* is not permitted, based on the current security policy and the
* context encapsulated by this object.
* @exception NullPointerException if the permission to check for is null.
* @throws NullPointerException if the permission to check for is null.
*/
public void checkPermission(Permission perm)
throws AccessControlException

View file

@ -298,7 +298,7 @@ public final class AccessController {
*
* @return the value returned by the action's {@code run} method.
*
* @exception NullPointerException if the action is {@code null}
* @throws NullPointerException if the action is {@code null}
*
* @see #doPrivileged(PrivilegedAction,AccessControlContext)
* @see #doPrivileged(PrivilegedExceptionAction)
@ -330,7 +330,7 @@ public final class AccessController {
*
* @return the value returned by the action's {@code run} method.
*
* @exception NullPointerException if the action is {@code null}
* @throws NullPointerException if the action is {@code null}
*
* @see #doPrivileged(PrivilegedAction)
* @see java.security.DomainCombiner
@ -377,7 +377,7 @@ public final class AccessController {
*
* @return the value returned by the action's {@code run} method.
*
* @exception NullPointerException if the action is {@code null}
* @throws NullPointerException if the action is {@code null}
*
* @see #doPrivileged(PrivilegedAction)
* @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
@ -534,9 +534,9 @@ public final class AccessController {
*
* @return the value returned by the action's {@code run} method
*
* @exception PrivilegedActionException if the specified action's
* @throws PrivilegedActionException if the specified action's
* {@code run} method threw a <i>checked</i> exception
* @exception NullPointerException if the action is {@code null}
* @throws NullPointerException if the action is {@code null}
*
* @see #doPrivileged(PrivilegedAction)
* @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
@ -577,9 +577,9 @@ public final class AccessController {
*
* @return the value returned by the action's {@code run} method
*
* @exception PrivilegedActionException if the specified action's
* @throws PrivilegedActionException if the specified action's
* {@code run} method threw a <i>checked</i> exception
* @exception NullPointerException if the action is {@code null}
* @throws NullPointerException if the action is {@code null}
*
* @see #doPrivileged(PrivilegedAction)
* @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
@ -672,9 +672,9 @@ public final class AccessController {
*
* @return the value returned by the action's {@code run} method
*
* @exception PrivilegedActionException if the specified action's
* @throws PrivilegedActionException if the specified action's
* {@code run} method threw a <i>checked</i> exception
* @exception NullPointerException if the action is {@code null}
* @throws NullPointerException if the action is {@code null}
*
* @see #doPrivileged(PrivilegedAction)
* @see #doPrivileged(PrivilegedAction,AccessControlContext)
@ -990,9 +990,9 @@ public final class AccessController {
*
* @param perm the requested permission.
*
* @exception AccessControlException if the specified permission
* @throws AccessControlException if the specified permission
* is not permitted, based on the current security policy.
* @exception NullPointerException if the specified permission
* @throws NullPointerException if the specified permission
* is {@code null} and is checked based on the
* security policy currently in effect.
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -334,7 +334,7 @@ public class AlgorithmParameterGenerator {
*
* @param genParamSpec the set of algorithm-specific parameter generation values.
*
* @exception InvalidAlgorithmParameterException if the given parameter
* @throws InvalidAlgorithmParameterException if the given parameter
* generation values are inappropriate for this parameter generator.
*/
public final void init(AlgorithmParameterSpec genParamSpec)
@ -349,7 +349,7 @@ public class AlgorithmParameterGenerator {
* @param genParamSpec the set of algorithm-specific parameter generation values.
* @param random the source of randomness.
*
* @exception InvalidAlgorithmParameterException if the given parameter
* @throws InvalidAlgorithmParameterException if the given parameter
* generation values are inappropriate for this parameter generator.
*/
public final void init(AlgorithmParameterSpec genParamSpec,

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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 abstract class AlgorithmParameterGeneratorSpi {
* @param genParamSpec the set of algorithm-specific parameter generation values.
* @param random the source of randomness.
*
* @exception InvalidAlgorithmParameterException if the given parameter
* @throws InvalidAlgorithmParameterException if the given parameter
* generation values are inappropriate for this parameter generator.
*/
protected abstract void engineInit(AlgorithmParameterSpec genParamSpec,

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -282,7 +282,7 @@ public class AlgorithmParameters {
*
* @param paramSpec the parameter specification.
*
* @exception InvalidParameterSpecException if the given parameter
* @throws InvalidParameterSpecException if the given parameter
* specification is inappropriate for the initialization of this parameter
* object, or if this parameter object has already been initialized.
*/
@ -303,7 +303,7 @@ public class AlgorithmParameters {
*
* @param params the encoded parameters.
*
* @exception IOException on decoding errors, or if this parameter object
* @throws IOException on decoding errors, or if this parameter object
* has already been initialized.
*/
public final void init(byte[] params) throws IOException {
@ -325,7 +325,7 @@ public class AlgorithmParameters {
*
* @param format the name of the decoding scheme.
*
* @exception IOException on decoding errors, or if this parameter object
* @throws IOException on decoding errors, or if this parameter object
* has already been initialized.
*/
public final void init(byte[] params, String format) throws IOException {
@ -349,7 +349,7 @@ public class AlgorithmParameters {
*
* @return the parameter specification.
*
* @exception InvalidParameterSpecException if the requested parameter
* @throws InvalidParameterSpecException if the requested parameter
* specification is inappropriate for this parameter object, or if this
* parameter object has not been initialized.
*/
@ -370,7 +370,7 @@ public class AlgorithmParameters {
*
* @return the parameters encoded using their primary encoding format.
*
* @exception IOException on encoding errors, or if this parameter object
* @throws IOException on encoding errors, or if this parameter object
* has not been initialized.
*/
public final byte[] getEncoded() throws IOException
@ -392,7 +392,7 @@ public class AlgorithmParameters {
*
* @return the parameters encoded using the specified encoding scheme.
*
* @exception IOException on encoding errors, or if this parameter object
* @throws IOException on encoding errors, or if this parameter object
* has not been initialized.
*/
public final byte[] getEncoded(String format) throws IOException

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -56,7 +56,7 @@ public abstract class AlgorithmParametersSpi {
*
* @param paramSpec the parameter specification.
*
* @exception InvalidParameterSpecException if the given parameter
* @throws InvalidParameterSpecException if the given parameter
* specification is inappropriate for the initialization of this parameter
* object.
*/
@ -71,7 +71,7 @@ public abstract class AlgorithmParametersSpi {
*
* @param params the encoded parameters.
*
* @exception IOException on decoding errors
* @throws IOException on decoding errors
*/
protected abstract void engineInit(byte[] params)
throws IOException;
@ -88,7 +88,7 @@ public abstract class AlgorithmParametersSpi {
*
* @param format the name of the decoding format.
*
* @exception IOException on decoding errors
* @throws IOException on decoding errors
*/
protected abstract void engineInit(byte[] params, String format)
throws IOException;
@ -109,7 +109,7 @@ public abstract class AlgorithmParametersSpi {
*
* @return the parameter specification.
*
* @exception InvalidParameterSpecException if the requested parameter
* @throws InvalidParameterSpecException if the requested parameter
* specification is inappropriate for this parameter object.
*/
protected abstract
@ -124,7 +124,7 @@ public abstract class AlgorithmParametersSpi {
*
* @return the parameters encoded using their primary encoding format.
*
* @exception IOException on encoding errors.
* @throws IOException on encoding errors.
*/
protected abstract byte[] engineGetEncoded() throws IOException;
@ -139,7 +139,7 @@ public abstract class AlgorithmParametersSpi {
*
* @return the parameters encoded using the specified encoding scheme.
*
* @exception IOException on encoding errors.
* @throws IOException on encoding errors.
*/
protected abstract byte[] engineGetEncoded(String format)
throws IOException;

View file

@ -178,10 +178,10 @@ final class AllPermissionCollection
*
* @param permission the Permission object to add.
*
* @exception IllegalArgumentException - if the permission is not a
* @throws IllegalArgumentException - if the permission is not a
* AllPermission
*
* @exception SecurityException - if this AllPermissionCollection object
* @throws SecurityException - if this AllPermissionCollection object
* has been marked readonly
*/

View file

@ -349,13 +349,13 @@ final class BasicPermissionCollection
*
* @param permission the Permission object to add.
*
* @exception IllegalArgumentException - if the permission is not a
* @throws IllegalArgumentException - if the permission is not a
* BasicPermission, or if
* the permission is not of the
* same Class as the other
* permissions in this collection.
*
* @exception SecurityException - if this BasicPermissionCollection object
* @throws SecurityException - if this BasicPermissionCollection object
* has been marked readonly
*/
@Override

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2017, 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
@ -101,10 +101,10 @@ public interface Certificate {
* @param stream the output stream to which to encode the
* certificate.
*
* @exception KeyException if the certificate is not
* @throws KeyException if the certificate is not
* properly initialized, or data is missing, etc.
*
* @exception IOException if a stream exception occurs while
* @throws IOException if a stream exception occurs while
* trying to output the encoded certificate to the output stream.
*
* @see #decode
@ -121,10 +121,10 @@ public interface Certificate {
* @param stream the input stream from which to fetch the data
* being decoded.
*
* @exception KeyException if the certificate is not properly initialized,
* @throws KeyException if the certificate is not properly initialized,
* or data is missing, etc.
*
* @exception IOException if an exception occurs while trying to input
* @throws IOException if an exception occurs while trying to input
* the encoded certificate from the input stream.
*
* @see #encode

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
@ -117,7 +117,7 @@ public class DigestInputStream extends FilterInputStream {
*
* @return the byte read.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*
* @see MessageDigest#update(byte)
*/
@ -154,7 +154,7 @@ public class DigestInputStream extends FilterInputStream {
* read because the end of the stream had already been reached when
* the call was made.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*
* @see MessageDigest#update(byte[], int, int)
*/

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
@ -108,7 +108,7 @@ public class DigestOutputStream extends FilterOutputStream {
* @param b the byte to be used for updating and writing to the
* output stream.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*
* @see MessageDigest#update(byte)
*/
@ -138,7 +138,7 @@ public class DigestOutputStream extends FilterOutputStream {
* @param len the number of bytes of data to be updated and written
* from {@code b}, starting at offset {@code off}.
*
* @exception IOException if an I/O error occurs.
* @throws IOException if an I/O error occurs.
*
* @see MessageDigest#update(byte[], int, int)
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@ -125,7 +125,7 @@ public final class DomainLoadStoreParameter implements LoadStoreParameter {
* been specified by properties in the domain configuration data.
* It is cloned to prevent subsequent modification.
*
* @exception NullPointerException if {@code configuration} or
* @throws NullPointerException if {@code configuration} or
* {@code protectionParams} is {@code null}
*/
public DomainLoadStoreParameter(URI configuration,

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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,7 +50,7 @@ public interface Guard {
*
* @param object the object being protected by the guard.
*
* @exception SecurityException if access is denied.
* @throws SecurityException if access is denied.
*
*/
void checkGuard(Object object) throws SecurityException;

View file

@ -77,7 +77,7 @@ public class GuardedObject implements java.io.Serializable {
*
* @return the guarded object.
*
* @exception SecurityException if access to the guarded object is
* @throws SecurityException if access to the guarded object is
* denied.
*/
public Object getObject()

View file

@ -113,7 +113,7 @@ public abstract class Identity implements Principal, Serializable {
* @param name the identity name.
* @param scope the scope of the identity.
*
* @exception KeyManagementException if there is already an identity
* @throws KeyManagementException if there is already an identity
* with the same name in the scope.
*/
public Identity(String name, IdentityScope scope) throws
@ -173,10 +173,10 @@ public abstract class Identity implements Principal, Serializable {
*
* @param key the public key for this identity.
*
* @exception KeyManagementException if another identity in the
* @throws KeyManagementException if another identity in the
* identity's scope has the same public key, or if another exception occurs.
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSecurityAccess} method doesn't allow
* setting the public key.
*
@ -200,7 +200,7 @@ public abstract class Identity implements Principal, Serializable {
*
* @param info the information string.
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSecurityAccess} method doesn't allow
* setting the information string.
*
@ -235,11 +235,11 @@ public abstract class Identity implements Principal, Serializable {
*
* @param certificate the certificate to be added.
*
* @exception KeyManagementException if the certificate is not valid,
* @throws KeyManagementException if the certificate is not valid,
* if the public key in the certificate being added conflicts with
* this identity's public key, or if another exception occurs.
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSecurityAccess} method doesn't allow
* adding a certificate.
*
@ -286,10 +286,10 @@ public abstract class Identity implements Principal, Serializable {
*
* @param certificate the certificate to be removed.
*
* @exception KeyManagementException if the certificate is
* @throws KeyManagementException if the certificate is
* missing, or if another exception occurs.
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSecurityAccess} method doesn't allow
* removing a certificate.
*
@ -400,7 +400,7 @@ public abstract class Identity implements Principal, Serializable {
* @return information about this identity, such as its name and the
* name of its scope (if any).
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSecurityAccess} method doesn't allow
* returning a string describing this identity.
*
@ -430,7 +430,7 @@ public abstract class Identity implements Principal, Serializable {
* is true, then this method returns more information than that
* provided by the {@code toString} method without any arguments.
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSecurityAccess} method doesn't allow
* returning a string describing this identity.
*

View file

@ -121,7 +121,7 @@ class IdentityScope extends Identity {
* @param name the scope name.
* @param scope the scope for the new identity scope.
*
* @exception KeyManagementException if there is already an identity
* @throws KeyManagementException if there is already an identity
* with the same name in the scope.
*/
public IdentityScope(String name, IdentityScope scope)
@ -155,7 +155,7 @@ class IdentityScope extends Identity {
*
* @param scope the scope to set.
*
* @exception SecurityException if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* {@code checkSecurityAccess} method doesn't allow
* setting the identity scope.
*
@ -214,7 +214,7 @@ class IdentityScope extends Identity {
*
* @param identity the identity to be added.
*
* @exception KeyManagementException if the identity is not
* @throws KeyManagementException if the identity is not
* valid, a name conflict occurs, another identity has the same
* public key as the identity being added, or another exception
* occurs. */
@ -226,7 +226,7 @@ class IdentityScope extends Identity {
*
* @param identity the identity to be removed.
*
* @exception KeyManagementException if the identity is missing,
* @throws KeyManagementException if the identity is missing,
* or another exception occurs.
*/
public abstract void removeIdentity(Identity identity)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -337,7 +337,7 @@ public class KeyFactory {
*
* @return the public key.
*
* @exception InvalidKeySpecException if the given key specification
* @throws InvalidKeySpecException if the given key specification
* is inappropriate for this key factory to produce a public key.
*/
public final PublicKey generatePublic(KeySpec keySpec)
@ -375,7 +375,7 @@ public class KeyFactory {
*
* @return the private key.
*
* @exception InvalidKeySpecException if the given key specification
* @throws InvalidKeySpecException if the given key specification
* is inappropriate for this key factory to produce a private key.
*/
public final PrivateKey generatePrivate(KeySpec keySpec)
@ -423,7 +423,7 @@ public class KeyFactory {
* @return the underlying key specification (key material) in an instance
* of the requested specification class.
*
* @exception InvalidKeySpecException if the requested key specification is
* @throws InvalidKeySpecException if the requested key specification is
* inappropriate for the given key, or the given key cannot be processed
* (e.g., the given key has an unrecognized algorithm or format).
*/
@ -462,7 +462,7 @@ public class KeyFactory {
*
* @return the translated key.
*
* @exception InvalidKeyException if the given key cannot be processed
* @throws InvalidKeyException if the given key cannot be processed
* by this key factory.
*/
public final Key translateKey(Key key) throws InvalidKeyException {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -77,7 +77,7 @@ public abstract class KeyFactorySpi {
*
* @return the public key.
*
* @exception InvalidKeySpecException if the given key specification
* @throws InvalidKeySpecException if the given key specification
* is inappropriate for this key factory to produce a public key.
*/
protected abstract PublicKey engineGeneratePublic(KeySpec keySpec)
@ -91,7 +91,7 @@ public abstract class KeyFactorySpi {
*
* @return the private key.
*
* @exception InvalidKeySpecException if the given key specification
* @throws InvalidKeySpecException if the given key specification
* is inappropriate for this key factory to produce a private key.
*/
protected abstract PrivateKey engineGeneratePrivate(KeySpec keySpec)
@ -116,7 +116,7 @@ public abstract class KeyFactorySpi {
* @return the underlying key specification (key material) in an instance
* of the requested specification class.
* @exception InvalidKeySpecException if the requested key specification is
* @throws InvalidKeySpecException if the requested key specification is
* inappropriate for the given key, or the given key cannot be dealt with
* (e.g., the given key has an unrecognized format).
*/
@ -133,7 +133,7 @@ public abstract class KeyFactorySpi {
*
* @return the translated key.
*
* @exception InvalidKeyException if the given key cannot be processed
* @throws InvalidKeyException if the given key cannot be processed
* by this key factory.
*/
protected abstract Key engineTranslateKey(Key key)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -369,7 +369,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
* algorithm-specific metric, such as modulus length, specified in
* number of bits.
*
* @exception InvalidParameterException if the {@code keysize} is not
* @throws InvalidParameterException if the {@code keysize} is not
* supported by this KeyPairGenerator object.
*/
public void initialize(int keysize) {
@ -385,7 +385,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
* number of bits.
* @param random the source of randomness.
*
* @exception InvalidParameterException if the {@code keysize} is not
* @throws InvalidParameterException if the {@code keysize} is not
* supported by this KeyPairGenerator object.
*
* @since 1.2
@ -426,7 +426,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
*
* @param params the parameter set used to generate the keys.
*
* @exception InvalidAlgorithmParameterException if the given parameters
* @throws InvalidAlgorithmParameterException if the given parameters
* are inappropriate for this key pair generator.
*
* @since 1.2
@ -454,7 +454,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
* @param params the parameter set used to generate the keys.
* @param random the source of randomness.
*
* @exception InvalidAlgorithmParameterException if the given parameters
* @throws InvalidAlgorithmParameterException if the given parameters
* are inappropriate for this key pair generator.
*
* @since 1.2

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -68,7 +68,7 @@ public abstract class KeyPairGeneratorSpi {
*
* @param random the source of randomness for this generator.
*
* @exception InvalidParameterException if the {@code keysize} is not
* @throws InvalidParameterException if the {@code keysize} is not
* supported by this KeyPairGeneratorSpi object.
*/
public abstract void initialize(int keysize, SecureRandom random);
@ -90,7 +90,7 @@ public abstract class KeyPairGeneratorSpi {
*
* @param random the source of randomness for this generator.
*
* @exception InvalidAlgorithmParameterException if the given parameters
* @throws InvalidAlgorithmParameterException if the given parameters
* are inappropriate for this key pair generator.
*
* @since 1.2

View file

@ -121,7 +121,7 @@ public class KeyRep implements Serializable {
* @param encoded the encoded bytes returned from
* {@code Key.getEncoded()}
*
* @exception NullPointerException
* @throws NullPointerException
* if type is {@code null},
* if algorithm is {@code null},
* if format is {@code null},
@ -158,7 +158,7 @@ public class KeyRep implements Serializable {
*
* @return the resolved Key object
*
* @exception ObjectStreamException if the Type/format
* @throws ObjectStreamException if the Type/format
* combination is unrecognized, if the algorithm, key format, or
* encoded key bytes are unrecognized/invalid, of if the
* resolution of the key fails for any reason

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -296,7 +296,7 @@ public class KeyStore {
* for information about standard encryption algorithm names.
* @param protectionParameters the encryption algorithm parameter
* specification, which may be {@code null}
* @exception NullPointerException if {@code protectionAlgorithm} is
* @throws NullPointerException if {@code protectionAlgorithm} is
* {@code null}
*
* @since 1.8
@ -346,7 +346,7 @@ public class KeyStore {
*
* @see #destroy()
* @return the password, which may be {@code null}
* @exception IllegalStateException if the password has
* @throws IllegalStateException if the password has
* been cleared (destroyed)
*/
public synchronized char[] getPassword() {
@ -359,7 +359,7 @@ public class KeyStore {
/**
* Clears the password.
*
* @exception DestroyFailedException if this method was unable
* @throws DestroyFailedException if this method was unable
* to clear the password
*/
public synchronized void destroy() throws DestroyFailedException {
@ -394,7 +394,7 @@ public class KeyStore {
* CallbackHandler.
*
* @param handler the CallbackHandler
* @exception NullPointerException if handler is null
* @throws NullPointerException if handler is null
*/
public CallbackHandlerProtection(CallbackHandler handler) {
if (handler == null) {
@ -485,10 +485,10 @@ public class KeyStore {
* {@code Certificate} at index 0
* corresponding to the private key.
*
* @exception NullPointerException if
* @throws NullPointerException if
* {@code privateKey} or {@code chain}
* is {@code null}
* @exception IllegalArgumentException if the specified chain has a
* @throws IllegalArgumentException if the specified chain has a
* length of 0, if the specified chain does not contain
* {@code Certificate}s of the same type,
* or if the {@code PrivateKey} algorithm
@ -514,9 +514,9 @@ public class KeyStore {
* corresponding to the private key.
* @param attributes the attributes
*
* @exception NullPointerException if {@code privateKey}, {@code chain}
* @throws NullPointerException if {@code privateKey}, {@code chain}
* or {@code attributes} is {@code null}
* @exception IllegalArgumentException if the specified chain has a
* @throws IllegalArgumentException if the specified chain has a
* length of 0, if the specified chain does not contain
* {@code Certificate}s of the same type,
* or if the {@code PrivateKey} algorithm
@ -651,7 +651,7 @@ public class KeyStore {
*
* @param secretKey the {@code SecretKey}
*
* @exception NullPointerException if {@code secretKey}
* @throws NullPointerException if {@code secretKey}
* is {@code null}
*/
public SecretKeyEntry(SecretKey secretKey) {
@ -672,7 +672,7 @@ public class KeyStore {
* @param secretKey the {@code SecretKey}
* @param attributes the attributes
*
* @exception NullPointerException if {@code secretKey} or
* @throws NullPointerException if {@code secretKey} or
* {@code attributes} is {@code null}
*
* @since 1.8
@ -734,7 +734,7 @@ public class KeyStore {
*
* @param trustedCert the trusted {@code Certificate}
*
* @exception NullPointerException if
* @throws NullPointerException if
* {@code trustedCert} is {@code null}
*/
public TrustedCertificateEntry(Certificate trustedCert) {
@ -755,7 +755,7 @@ public class KeyStore {
* @param trustedCert the trusted {@code Certificate}
* @param attributes the attributes
*
* @exception NullPointerException if {@code trustedCert} or
* @throws NullPointerException if {@code trustedCert} or
* {@code attributes} is {@code null}
*
* @since 1.8
@ -1033,11 +1033,11 @@ public class KeyStore {
* @return the requested key, or null if the given alias does not exist
* or does not identify a key-related entry.
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
* @exception NoSuchAlgorithmException if the algorithm for recovering the
* @throws NoSuchAlgorithmException if the algorithm for recovering the
* key cannot be found
* @exception UnrecoverableKeyException if the key cannot be recovered
* @throws UnrecoverableKeyException if the key cannot be recovered
* (e.g., the given password is wrong).
*/
public final Key getKey(String alias, char[] password)
@ -1063,7 +1063,7 @@ public class KeyStore {
* followed by zero or more certificate authorities), or null if the given alias
* does not exist or does not contain a certificate chain
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final Certificate[] getCertificateChain(String alias)
@ -1096,7 +1096,7 @@ public class KeyStore {
* @return the certificate, or null if the given alias does not exist or
* does not contain a certificate.
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final Certificate getCertificate(String alias)
@ -1116,7 +1116,7 @@ public class KeyStore {
* @return the creation date of this entry, or null if the given alias does
* not exist
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final Date getCreationDate(String alias)
@ -1147,7 +1147,7 @@ public class KeyStore {
* key (only required if the given key is of type
* {@code java.security.PrivateKey}).
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded), the given key cannot be protected, or this operation fails
* for some other reason
*/
@ -1188,7 +1188,7 @@ public class KeyStore {
* key (only useful if the protected key is of type
* {@code java.security.PrivateKey}).
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded), or if this operation fails for some other reason.
*/
public final void setKeyEntry(String alias, byte[] key,
@ -1214,7 +1214,7 @@ public class KeyStore {
* @param alias the alias name
* @param cert the certificate
*
* @exception KeyStoreException if the keystore has not been initialized,
* @throws KeyStoreException if the keystore has not been initialized,
* or the given alias already exists and does not identify an
* entry containing a trusted certificate,
* or this operation fails for some other reason.
@ -1233,7 +1233,7 @@ public class KeyStore {
*
* @param alias the alias name
*
* @exception KeyStoreException if the keystore has not been initialized,
* @throws KeyStoreException if the keystore has not been initialized,
* or if the entry cannot be removed.
*/
public final void deleteEntry(String alias)
@ -1250,7 +1250,7 @@ public class KeyStore {
*
* @return enumeration of the alias names
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final Enumeration<String> aliases()
@ -1269,7 +1269,7 @@ public class KeyStore {
*
* @return true if the alias exists, false otherwise
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final boolean containsAlias(String alias)
@ -1286,7 +1286,7 @@ public class KeyStore {
*
* @return the number of entries in this keystore
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final int size()
@ -1309,7 +1309,7 @@ public class KeyStore {
* @return true if the entry identified by the given alias is a
* key-related entry, false otherwise.
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final boolean isKeyEntry(String alias)
@ -1332,7 +1332,7 @@ public class KeyStore {
* @return true if the entry identified by the given alias contains a
* trusted certificate, false otherwise.
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final boolean isCertificateEntry(String alias)
@ -1367,7 +1367,7 @@ public class KeyStore {
* @return the alias name of the first entry with a matching certificate,
* or null if no such entry exists in this keystore.
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
*/
public final String getCertificateAlias(Certificate cert)
@ -1386,12 +1386,12 @@ public class KeyStore {
* @param stream the output stream to which this keystore is written.
* @param password the password to generate the keystore integrity check
*
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
* @exception IOException if there was an I/O problem with data
* @exception NoSuchAlgorithmException if the appropriate data integrity
* @throws IOException if there was an I/O problem with data
* @throws NoSuchAlgorithmException if the appropriate data integrity
* algorithm could not be found
* @exception CertificateException if any of the certificates included in
* @throws CertificateException if any of the certificates included in
* the keystore data could not be stored
*/
public final void store(OutputStream stream, char[] password)
@ -1411,15 +1411,15 @@ public class KeyStore {
* that specifies how to store the keystore,
* which may be {@code null}
*
* @exception IllegalArgumentException if the given
* @throws IllegalArgumentException if the given
* {@code LoadStoreParameter}
* input is not recognized
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded)
* @exception IOException if there was an I/O problem with data
* @exception NoSuchAlgorithmException if the appropriate data integrity
* @throws IOException if there was an I/O problem with data
* @throws NoSuchAlgorithmException if the appropriate data integrity
* algorithm could not be found
* @exception CertificateException if any of the certificates included in
* @throws CertificateException if any of the certificates included in
* the keystore data could not be stored
*
* @since 1.5
@ -1455,15 +1455,15 @@ public class KeyStore {
* the keystore, the password used to unlock the keystore,
* or {@code null}
*
* @exception IOException if there is an I/O or format problem with the
* @throws IOException if there is an I/O or format problem with the
* keystore data, if a password is required but not given,
* or if the given password was incorrect. If the error is due to a
* wrong password, the {@link Throwable#getCause cause} of the
* {@code IOException} should be an
* {@code UnrecoverableKeyException}
* @exception NoSuchAlgorithmException if the algorithm used to check
* @throws NoSuchAlgorithmException if the algorithm used to check
* the integrity of the keystore cannot be found
* @exception CertificateException if any of the certificates in the
* @throws CertificateException if any of the certificates in the
* keystore could not be loaded
*/
public final void load(InputStream stream, char[] password)
@ -1483,18 +1483,18 @@ public class KeyStore {
* that specifies how to load the keystore,
* which may be {@code null}
*
* @exception IllegalArgumentException if the given
* @throws IllegalArgumentException if the given
* {@code LoadStoreParameter}
* input is not recognized
* @exception IOException if there is an I/O or format problem with the
* @throws IOException if there is an I/O or format problem with the
* keystore data. If the error is due to an incorrect
* {@code ProtectionParameter} (e.g. wrong password)
* the {@link Throwable#getCause cause} of the
* {@code IOException} should be an
* {@code UnrecoverableKeyException}
* @exception NoSuchAlgorithmException if the algorithm used to check
* @throws NoSuchAlgorithmException if the algorithm used to check
* the integrity of the keystore cannot be found
* @exception CertificateException if any of the certificates in the
* @throws CertificateException if any of the certificates in the
* keystore could not be loaded
*
* @since 1.5
@ -1519,17 +1519,17 @@ public class KeyStore {
* @return the keystore {@code Entry} for the specified alias,
* or {@code null} if there is no such entry
*
* @exception NullPointerException if
* @throws NullPointerException if
* {@code alias} is {@code null}
* @exception NoSuchAlgorithmException if the algorithm for recovering the
* @throws NoSuchAlgorithmException if the algorithm for recovering the
* entry cannot be found
* @exception UnrecoverableEntryException if the specified
* @throws UnrecoverableEntryException if the specified
* {@code protParam} were insufficient or invalid
* @exception UnrecoverableKeyException if the entry is a
* @throws UnrecoverableKeyException if the entry is a
* {@code PrivateKeyEntry} or {@code SecretKeyEntry}
* and the specified {@code protParam} does not contain
* the information needed to recover the key (e.g. wrong password)
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded).
* @see #setEntry(String, KeyStore.Entry, KeyStore.ProtectionParameter)
*
@ -1562,10 +1562,10 @@ public class KeyStore {
* used to protect the {@code Entry},
* which may be {@code null}
*
* @exception NullPointerException if
* @throws NullPointerException if
* {@code alias} or {@code entry}
* is {@code null}
* @exception KeyStoreException if the keystore has not been initialized
* @throws KeyStoreException if the keystore has not been initialized
* (loaded), or if this operation fails for some other reason
*
* @see #getEntry(String, KeyStore.ProtectionParameter)
@ -1596,10 +1596,10 @@ public class KeyStore {
* {@code alias} is an instance or subclass of the
* specified {@code entryClass}, false otherwise
*
* @exception NullPointerException if
* @throws NullPointerException if
* {@code alias} or {@code entryClass}
* is {@code null}
* @exception KeyStoreException if the keystore has not been
* @throws KeyStoreException if the keystore has not been
* initialized (loaded)
*
* @since 1.5
@ -1841,7 +1841,7 @@ public class KeyStore {
* Returns the KeyStore described by this object.
*
* @return the {@code KeyStore} described by this object
* @exception KeyStoreException if an error occurred during the
* @throws KeyStoreException if an error occurred during the
* operation, for example if the KeyStore could not be
* instantiated or loaded
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 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
@ -66,9 +66,9 @@ public abstract class KeyStoreSpi {
* @return the requested key, or null if the given alias does not exist
* or does not identify a key-related entry.
*
* @exception NoSuchAlgorithmException if the algorithm for recovering the
* @throws NoSuchAlgorithmException if the algorithm for recovering the
* key cannot be found
* @exception UnrecoverableKeyException if the key cannot be recovered
* @throws UnrecoverableKeyException if the key cannot be recovered
* (e.g., the given password is wrong).
*/
public abstract Key engineGetKey(String alias, char[] password)
@ -141,7 +141,7 @@ public abstract class KeyStoreSpi {
* key (only required if the given key is of type
* {@code java.security.PrivateKey}).
*
* @exception KeyStoreException if the given key cannot be protected, or
* @throws KeyStoreException if the given key cannot be protected, or
* this operation fails for some other reason
*/
public abstract void engineSetKeyEntry(String alias, Key key,
@ -168,7 +168,7 @@ public abstract class KeyStoreSpi {
* key (only useful if the protected key is of type
* {@code java.security.PrivateKey}).
*
* @exception KeyStoreException if this operation fails.
* @throws KeyStoreException if this operation fails.
*/
public abstract void engineSetKeyEntry(String alias, byte[] key,
Certificate[] chain)
@ -187,7 +187,7 @@ public abstract class KeyStoreSpi {
* @param alias the alias name
* @param cert the certificate
*
* @exception KeyStoreException if the given alias already exists and does
* @throws KeyStoreException if the given alias already exists and does
* not identify an entry containing a trusted certificate,
* or this operation fails for some other reason.
*/
@ -200,7 +200,7 @@ public abstract class KeyStoreSpi {
*
* @param alias the alias name
*
* @exception KeyStoreException if the entry cannot be removed.
* @throws KeyStoreException if the entry cannot be removed.
*/
public abstract void engineDeleteEntry(String alias)
throws KeyStoreException;
@ -286,10 +286,10 @@ public abstract class KeyStoreSpi {
* @param stream the output stream to which this keystore is written.
* @param password the password to generate the keystore integrity check
*
* @exception IOException if there was an I/O problem with data
* @exception NoSuchAlgorithmException if the appropriate data integrity
* @throws IOException if there was an I/O problem with data
* @throws NoSuchAlgorithmException if the appropriate data integrity
* algorithm could not be found
* @exception CertificateException if any of the certificates included in
* @throws CertificateException if any of the certificates included in
* the keystore data could not be stored
*/
public abstract void engineStore(OutputStream stream, char[] password)
@ -303,13 +303,13 @@ public abstract class KeyStoreSpi {
* that specifies how to store the keystore,
* which may be {@code null}
*
* @exception IllegalArgumentException if the given
* @throws IllegalArgumentException if the given
* {@code KeyStore.LoadStoreParmeter}
* input is not recognized
* @exception IOException if there was an I/O problem with data
* @exception NoSuchAlgorithmException if the appropriate data integrity
* @throws IOException if there was an I/O problem with data
* @throws NoSuchAlgorithmException if the appropriate data integrity
* algorithm could not be found
* @exception CertificateException if any of the certificates included in
* @throws CertificateException if any of the certificates included in
* the keystore data could not be stored
*
* @since 1.5
@ -335,15 +335,15 @@ public abstract class KeyStoreSpi {
* the keystore, the password used to unlock the keystore,
* or {@code null}
*
* @exception IOException if there is an I/O or format problem with the
* @throws IOException if there is an I/O or format problem with the
* keystore data, if a password is required but not given,
* or if the given password was incorrect. If the error is due to a
* wrong password, the {@link Throwable#getCause cause} of the
* {@code IOException} should be an
* {@code UnrecoverableKeyException}
* @exception NoSuchAlgorithmException if the algorithm used to check
* @throws NoSuchAlgorithmException if the algorithm used to check
* the integrity of the keystore cannot be found
* @exception CertificateException if any of the certificates in the
* @throws CertificateException if any of the certificates in the
* keystore could not be loaded
*/
public abstract void engineLoad(InputStream stream, char[] password)
@ -376,18 +376,18 @@ public abstract class KeyStoreSpi {
* extracted. If the {@code KeyStore.ProtectionParameter} is neither
* of those classes then a {@code NoSuchAlgorithmException} is thrown.
*
* @exception IllegalArgumentException if the given
* @throws IllegalArgumentException if the given
* {@code KeyStore.LoadStoreParameter}
* input is not recognized
* @exception IOException if there is an I/O or format problem with the
* @throws IOException if there is an I/O or format problem with the
* keystore data. If the error is due to an incorrect
* {@code ProtectionParameter} (e.g. wrong password)
* the {@link Throwable#getCause cause} of the
* {@code IOException} should be an
* {@code UnrecoverableKeyException}
* @exception NoSuchAlgorithmException if the algorithm used to check
* @throws NoSuchAlgorithmException if the algorithm used to check
* the integrity of the keystore cannot be found
* @exception CertificateException if any of the certificates in the
* @throws CertificateException if any of the certificates in the
* keystore could not be loaded
*
* @since 1.5
@ -447,12 +447,12 @@ public abstract class KeyStoreSpi {
* @return the {@code KeyStore.Entry} for the specified alias,
* or {@code null} if there is no such entry
*
* @exception KeyStoreException if the operation failed
* @exception NoSuchAlgorithmException if the algorithm for recovering the
* @throws KeyStoreException if the operation failed
* @throws NoSuchAlgorithmException if the algorithm for recovering the
* entry cannot be found
* @exception UnrecoverableEntryException if the specified
* @throws UnrecoverableEntryException if the specified
* {@code protParam} were insufficient or invalid
* @exception UnrecoverableKeyException if the entry is a
* @throws UnrecoverableKeyException if the entry is a
* {@code PrivateKeyEntry} or {@code SecretKeyEntry}
* and the specified {@code protParam} does not contain
* the information needed to recover the key (e.g. wrong password)
@ -518,7 +518,7 @@ public abstract class KeyStoreSpi {
* used to protect the {@code Entry},
* which may be {@code null}
*
* @exception KeyStoreException if this operation fails
* @throws KeyStoreException if this operation fails
*
* @since 1.5
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2017, 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
@ -399,7 +399,7 @@ public abstract class MessageDigest extends MessageDigestSpi {
*
* @return the number of bytes placed into {@code buf}
*
* @exception DigestException if an error occurs.
* @throws DigestException if an error occurs.
*/
public int digest(byte[] buf, int offset, int len) throws DigestException {
if (buf == null) {
@ -536,7 +536,7 @@ public abstract class MessageDigest extends MessageDigestSpi {
*
* @return a clone if the implementation is cloneable.
*
* @exception CloneNotSupportedException if this is called on an
* @throws CloneNotSupportedException if this is called on an
* implementation that does not support {@code Cloneable}.
*/
public Object clone() throws CloneNotSupportedException {
@ -580,7 +580,7 @@ public abstract class MessageDigest extends MessageDigestSpi {
*
* @return a clone if the delegate is cloneable.
*
* @exception CloneNotSupportedException if this is called on a
* @throws CloneNotSupportedException if this is called on a
* delegate that does not support {@code Cloneable}.
*/
public Object clone() throws CloneNotSupportedException {

Some files were not shown because too many files have changed in this diff Show more