summaryrefslogtreecommitdiff
path: root/libjava/java/io/FileDescriptor.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-13 09:13:31 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-13 09:13:31 +0000
commit8e2dc45759a8a549740954370f10c4973ee2aa52 (patch)
tree4f31beddee142afb687e3a3b376d800f72755434 /libjava/java/io/FileDescriptor.java
parentd957c480ac27a47b83b7d3e7b6e5105cdcd18573 (diff)
downloadgcc-8e2dc45759a8a549740954370f10c4973ee2aa52.tar.gz
2003-05-13 Michael Koch <konqueror@gmx.de>
* java/io/FileDescriptor.java (SYNC): New constant. (DSYNC): Likewise. (getLength): Renamed from lenght() to match classpath's FileDescriptor.java. * java/io/RandomAccessFile.java (RandomAccessFile): Removed unneeded mode check, implemented mode "rws" and "rwd", merged documentation from classpath. (setLength): Reformatted. (length): Use new getLength() of FileDescriptor. * java/io/natFileDescriptorEcos.cc (getLength): Renamed from length(). * java/io/natFileDescriptorPosix.cc (open): Implemented support for SYNC and DSYNC. (seek): Use getLength() instead of length(). (getLength): Renamed from length(). * java/io/natFileDescriptorWin32.cc (getLength): Renamed from length(). (seek): Use getLength() instead of length(). (available): Likewise. * gnu/java/nio/natFileChannelImpl.cc (size): Use getLength() instead of length(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66755 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/io/FileDescriptor.java')
-rw-r--r--libjava/java/io/FileDescriptor.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/java/io/FileDescriptor.java b/libjava/java/io/FileDescriptor.java
index 296c37f8b8a..5c5168c272c 100644
--- a/libjava/java/io/FileDescriptor.java
+++ b/libjava/java/io/FileDescriptor.java
@@ -44,6 +44,8 @@ public final class FileDescriptor
static final int APPEND = 4;
// EXCL is used only when making a temp file.
static final int EXCL = 8;
+ static final int SYNC = 16;
+ static final int DSYNC = 32;
// These are WHENCE values for seek.
static final int SET = 0;
@@ -71,7 +73,7 @@ public final class FileDescriptor
// 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 getLength () throws IOException;
native long getFilePointer () throws IOException;
native int read () throws IOException;
native int read (byte[] bytes, int offset, int len) throws IOException;