diff options
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/io/RandomAccessFile.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libjava/java/io/RandomAccessFile.java b/libjava/java/io/RandomAccessFile.java index 81b7050..1d30f1f 100644 --- a/libjava/java/io/RandomAccessFile.java +++ b/libjava/java/io/RandomAccessFile.java @@ -171,7 +171,11 @@ public class RandomAccessFile implements DataOutput, DataInput public int skipBytes (int count) throws IOException { - return count <= 0 ? 0 : fd.seek(count, FileDescriptor.CUR, true); + if (count <= 0) + return 0; + long startPos = fd.getFilePointer(); + long endPos = fd.seek(count, FileDescriptor.CUR, true); + return (int) (endPos - startPos); } public void write (int oneByte) throws IOException |