Commit acf9549e by Bryce McKinlay Committed by Bryce McKinlay

FileInputStream.java (skip): Call fd.getFilePointer() and calculate correct…

FileInputStream.java (skip): Call fd.getFilePointer() and calculate correct number of bytes skipped.

	* java/io/FileInputStream.java (skip): Call fd.getFilePointer() and
	calculate correct number of bytes skipped.

From-SVN: r51293
parent e89268b6
......@@ -2,6 +2,9 @@
* java/io/PushbackReader.java: Reformat.
* java/io/FileInputStream.java (skip): Call fd.getFilePointer() and
calculate correct number of bytes skipped.
2002-03-24 Tom Tromey <tromey@redhat.com>
* java/awt/TextComponent.java (TextComponent): Editable by
......
......@@ -88,6 +88,8 @@ public class FileInputStream extends InputStream
public long skip(long n) throws IOException
{
return n <= 0 ? 0 : fd.seek(n, FileDescriptor.CUR, true);
long startPos = fd.getFilePointer();
long endPos = fd.seek(n, FileDescriptor.CUR, true);
return endPos - startPos;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment