/[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.21 by mkoch, Mon Mar 24 10:19:19 2003 UTC revision 1.22 by mkoch, Sun Apr 6 09:18:12 2003 UTC
# Line 283  public class FileInputStream extends Inp Line 283  public class FileInputStream extends Inp
283     *     *
284     * @exception IOException If an error occurs     * @exception IOException If an error occurs
285     */     */
286    public synchronized long skip(long numBytes) throws IOException    public synchronized long skip (long numBytes) throws IOException
287    {    {
288      if (numBytes < 0)      if (numBytes < 0)
289        throw new IllegalArgumentException("Can't skip negative bytes: " +        throw new IllegalArgumentException ("Can't skip negative bytes: " +
290                                           numBytes);                                            numBytes);
291    
292      if (numBytes == 0)      if (numBytes == 0)
293        return(0);        return 0;
294    
295      long curPos = fd.getFilePointer();      long curPos = fd.getFilePointer ();
296      long newPos = fd.seek(numBytes, FileDescriptor.CUR, true);      long newPos = fd.seek (numBytes, FileDescriptor.CUR, true);
297      return newPos - curPos;      return newPos - curPos;
298    }    }
299    

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

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