< prev index next >
src/java.base/share/classes/java/io/RandomAccessFile.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 417,429 ****
* repeatedly from the file until the requested number of bytes are
* read. This method blocks until the requested number of bytes are
* read, the end of the stream is detected, or an exception is thrown.
*
* @param b the buffer into which the data is read.
! * @exception EOFException if this file reaches the end before reading
* all the bytes.
! * @exception IOException if an I/O error occurs.
*/
public final void readFully(byte b[]) throws IOException {
readFully(b, 0, b.length);
}
--- 417,430 ----
* repeatedly from the file until the requested number of bytes are
* read. This method blocks until the requested number of bytes are
* read, the end of the stream is detected, or an exception is thrown.
*
* @param b the buffer into which the data is read.
! * @throws NullPointerException if {@code b} is {@code null}.
! * @throws EOFException if this file reaches the end before reading
* all the bytes.
! * @throws IOException if an I/O error occurs.
*/
public final void readFully(byte b[]) throws IOException {
readFully(b, 0, b.length);
}
*** 433,447 ****
* repeatedly from the file until the requested number of bytes are
* read. This method blocks until the requested number of bytes are
* read, the end of the stream is detected, or an exception is thrown.
*
* @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 EOFException if this file reaches the end before reading
* all the bytes.
! * @exception IOException if an I/O error occurs.
*/
public final void readFully(byte b[], int off, int len) throws IOException {
int n = 0;
do {
int count = this.read(b, off + n, len - n);
--- 434,452 ----
* repeatedly from the file until the requested number of bytes are
* read. This method blocks until the requested number of bytes are
* read, the end of the stream is detected, or an exception is thrown.
*
* @param b the buffer into which the data is read.
! * @param off the start offset into the data array {@code b}.
* @param len the number of bytes to read.
! * @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}.
! * @throws EOFException if this file reaches the end before reading
* all the bytes.
! * @throws IOException if an I/O error occurs.
*/
public final void readFully(byte b[], int off, int len) throws IOException {
int n = 0;
do {
int count = this.read(b, off + n, len - n);
< prev index next >