/[classpath]/classpath/java/io/FileInputStream.java
ViewVC logotype

Diff of /classpath/java/io/FileInputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by mkoch, Mon Mar 24 07:27:52 2003 UTC revision 1.20 by mkoch, Mon Mar 24 08:01:39 2003 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package java.io;  package java.io;
40    
 import gnu.classpath.Configuration;  
41  import java.nio.channels.FileChannel;  import java.nio.channels.FileChannel;
42  import gnu.java.nio.FileChannelImpl;  import gnu.java.nio.FileChannelImpl;
43    
# Line 47  import gnu.java.nio.FileChannelImpl; Line 46  import gnu.java.nio.FileChannelImpl;
46   * plus online API docs for JDK 1.2 beta from http://www.javasoft.com.   * plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
47   * Status:  Believed complete and correct.   * Status:  Believed complete and correct.
48   */   */
49    
50  /**  /**
51   * This class is a stream that reads its bytes from a file.   * This class is a stream that reads its bytes from a file.
52   *   *
# Line 144  public class FileInputStream extends Inp Line 143  public class FileInputStream extends Inp
143      if (s != null)      if (s != null)
144        s.checkRead(fdObj);        s.checkRead(fdObj);
145    
146      this.fd = fdObj;      fd = fdObj;
147    }    }
148    
149    /**    /**
# Line 256  public class FileInputStream extends Inp Line 255  public class FileInputStream extends Inp
255     */     */
256    public int read(byte[] buf, int offset, int len) throws IOException    public int read(byte[] buf, int offset, int len) throws IOException
257    {    {
258      if (off < 0 || len < 0 || off + len > b.length)      if (offset < 0
259            || len < 0
260            || offset + len > buf.length)
261        throw new ArrayIndexOutOfBoundsException();        throw new ArrayIndexOutOfBoundsException();
262    
263      return fd.read(buf, offset, len);      return fd.read(buf, offset, len);

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26