/[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.20 by mkoch, Mon Mar 24 08:01:39 2003 UTC revision 1.21 by mkoch, Mon Mar 24 10:19:19 2003 UTC
# Line 179  public class FileInputStream extends Inp Line 179  public class FileInputStream extends Inp
179     */     */
180    public void close() throws IOException    public void close() throws IOException
181    {    {
182      fd.close();      if (fd.valid())
183          fd.close();
184      }
185    
186      protected void finalize() throws IOException
187      {
188        // We don't actually need this, but we include it because it is
189        // mentioned in the JCL.
190    }    }
191    
192    /**    /**
# Line 193  public class FileInputStream extends Inp Line 200  public class FileInputStream extends Inp
200     */     */
201    public final FileDescriptor getFD() throws IOException    public final FileDescriptor getFD() throws IOException
202    {    {
203        if (!fd.valid())
204          throw new IOException();
205      return fd;      return fd;
206    }    }
207    
# Line 284  public class FileInputStream extends Inp Line 293  public class FileInputStream extends Inp
293        return(0);        return(0);
294    
295      long curPos = fd.getFilePointer();      long curPos = fd.getFilePointer();
296      long newPos = fd.seek(numBytes, fd.CUR, true);      long newPos = fd.seek(numBytes, FileDescriptor.CUR, true);
297        return newPos - curPos;
     return(newPos-curPos);  
298    }    }
299    
300    /**    /**

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

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