summaryrefslogtreecommitdiff
path: root/libjava/java/io/FileInputStream.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-25 13:06:52 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-25 13:06:52 +0000
commit69614b54f2a086eb54fe478b72131f83633eeb64 (patch)
tree9f15c51e61878ea40347d0c638b354f0b8b8fef1 /libjava/java/io/FileInputStream.java
parentd5a39cea91271b5968b693de7ae52353891ec941 (diff)
downloadgcc-69614b54f2a086eb54fe478b72131f83633eeb64.tar.gz
2003-03-25 Michael Koch <konqueror@gmx.de>
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64845 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/io/FileInputStream.java')
-rw-r--r--libjava/java/io/FileInputStream.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java
index 533dd080461..50abeaa6e67 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 <arenn@urbanophile.com>
* @author Warren Levy <warrenl@cygnus.com>
- * @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);
}
/**