8276164: RandomAccessFile#write method could throw IndexOutOfBoundsException that is not described in javadoc

Reviewed-by: alanb
This commit is contained in:
Masanori Yano 2021-11-02 06:44:48 +00:00 committed by Alan Bateman
parent 0488ebdf14
commit 9bf31652cb
2 changed files with 5 additions and 1 deletions

View file

@ -553,6 +553,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @throws IOException if an I/O error occurs.
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public void write(byte[] b, int off, int len) throws IOException {
writeBytes(b, off, len);