RandomAccessFile.java (skipBytes): Return number of bytes skipped.
2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com> * java/io/RandomAccessFile.java (skipBytes): Return number of bytes skipped. From-SVN: r56265
This commit is contained in:
parent
ee1884cb9b
commit
03496eb121
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
|
||||||
|
|
||||||
|
* java/io/RandomAccessFile.java (skipBytes): Return number of
|
||||||
|
bytes skipped.
|
||||||
|
|
||||||
2002-08-01 Mark Wielaard <mark@klomp.org>
|
2002-08-01 Mark Wielaard <mark@klomp.org>
|
||||||
|
|
||||||
Reenable patch since shared library troubles on powerpc are solved:
|
Reenable patch since shared library troubles on powerpc are solved:
|
||||||
|
|
|
@ -171,7 +171,11 @@ public class RandomAccessFile implements DataOutput, DataInput
|
||||||
|
|
||||||
public int skipBytes (int count) throws IOException
|
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
|
public void write (int oneByte) throws IOException
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue