From a62abb91257e37394607041104b47ed5d9b4baed Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 25 Mar 2003 13:06:52 +0000 Subject: 2003-03-25 Michael Koch * java/io/FileInputStream.java (read): Renamed b to buf and off to offset. * java/io/FileOutputStream.java (ch): Documentation added. (FileOutputStream): Documentation added. (getFD): Documentation added. (write): Documentation added. (close): Documentation added. (getChannel): Documentation added. From-SVN: r64845 --- libjava/java/io/FileInputStream.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'libjava/java/io/FileInputStream.java') diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java index 533dd08..50abeaa 100644 --- a/libjava/java/io/FileInputStream.java +++ b/libjava/java/io/FileInputStream.java @@ -52,7 +52,6 @@ import gnu.java.nio.FileChannelImpl; * * @author Aaron M. Renn * @author Warren Levy - * @date October 28, 1998. */ public class FileInputStream extends InputStream { @@ -224,9 +223,9 @@ public class FileInputStream extends InputStream * * @exception IOException If an error occurs. */ - public int read(byte[] b) throws IOException + public int read(byte[] buf) throws IOException { - return fd.read(b, 0, b.length); + return read(buf, 0, buf.length); } /** @@ -248,12 +247,14 @@ public class FileInputStream extends InputStream * * @exception IOException If an error occurs. */ - public int read(byte[] b, int off, int len) throws IOException + public int read(byte[] buf, int offset, int len) throws IOException { - if (off < 0 || len < 0 || off + len > b.length) + if (offset < 0 + || len < 0 + || offset + len > buf.length) throw new ArrayIndexOutOfBoundsException(); - return fd.read(b, off, len); + return fd.read(buf, offset, len); } /** -- cgit v1.1