< prev index next >
src/java.base/share/classes/java/io/LineNumberInputStream.java
Print this page
*** 125,135 ****
* {@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.
* @see java.io.LineNumberInputStream#read()
*/
! public int read(byte b[], int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if ((off < 0) || (off > b.length) || (len < 0) ||
((off + len) > b.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
--- 125,135 ----
* {@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.
* @see java.io.LineNumberInputStream#read()
*/
! public int read(byte[] b, int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if ((off < 0) || (off > b.length) || (len < 0) ||
((off + len) > b.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
*** 177,187 ****
* @see java.io.FilterInputStream#in
*/
public long skip(long n) throws IOException {
int chunk = 2048;
long remaining = n;
! byte data[];
int nr;
if (n <= 0) {
return 0;
}
--- 177,187 ----
* @see java.io.FilterInputStream#in
*/
public long skip(long n) throws IOException {
int chunk = 2048;
long remaining = n;
! byte[] data;
int nr;
if (n <= 0) {
return 0;
}
< prev index next >