diff options
| author | Tom Tromey <tromey@redhat.com> | 2001-08-02 23:46:39 +0000 |
|---|---|---|
| committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-08-02 23:46:39 +0000 |
| commit | 8d6a437584510830e51262dabe3416c88dce431e (patch) | |
| tree | 9a4a339f33e52b784286ab24c2d8b29c0c4f6d69 /libjava/java/io/FileDescriptor.java | |
| parent | ead4cf347a033e7876095f45aeb0066b972f51a0 (diff) | |
RandomAccessFile.java (seek): Let seek go past end of file.
* java/io/RandomAccessFile.java (seek): Let seek go past end of
file.
(skipBytes): Don't fail if seeking past end of file.
* java/io/FileInputStream.java (skip): Don't fail if seeking past
end of file.
* java/io/natFileDescriptorWin32.cc (seek): Handle `eof_trunc'
argument.
* java/io/natFileDescriptorEcos.cc (seek): Handle `eof_trunc'
argument.
* java/io/natFileDescriptorPosix.cc (seek): Handle `eof_trunc'
argument.
* java/io/FileDescriptor.java (seek): Added `eof_trunc' argument.
From-SVN: r44586
Diffstat (limited to 'libjava/java/io/FileDescriptor.java')
| -rw-r--r-- | libjava/java/io/FileDescriptor.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libjava/java/io/FileDescriptor.java b/libjava/java/io/FileDescriptor.java index 493f14cf280..8afcda4768f 100644 --- a/libjava/java/io/FileDescriptor.java +++ b/libjava/java/io/FileDescriptor.java @@ -1,6 +1,6 @@ // FileDescriptor.java - Open file or device -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. @@ -54,7 +54,11 @@ public final class FileDescriptor native void write (byte[] b, int offset, int len) throws IOException, NullPointerException, IndexOutOfBoundsException; native void close () throws IOException; - native int seek (long pos, int whence) throws IOException; + // EOF_TRUNC is true if a request to seek past the end of file + // should actually stop at the end of file. If false, then a seek + // past the end is ok (and if a subsequent write occurs the file + // will grow). + native int seek (long pos, int whence, boolean eof_trunc) throws IOException; native long length () throws IOException; native long getFilePointer () throws IOException; native int read () throws IOException; |
