[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Patch: FileChannelImpl
From: |
Jeroen Frijters |
Subject: |
FYI: Patch: FileChannelImpl |
Date: |
Fri, 9 Apr 2004 16:45:56 +0200 |
Hi,
Committed.
Regards,
Jeroen
2004-04-09 Jeroen Frijters <address@hidden>
* gnu/java/nio/channels/FileChannelImpl.java (fd, mode): Made
private.
(length, pos): Removed. (FileChannelImpl (int, int)): Removed.
(implPosition, seek, implTruncate, unlock, lock): Added throws
clause.
Index: gnu/java/nio/channels/FileChannelImpl.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/nio/channels/FileChannelImpl.java,
v
retrieving revision 1.1
diff -u -r1.1 FileChannelImpl.java
--- gnu/java/nio/channels/FileChannelImpl.java 8 Apr 2004 20:04:12
-0000 1.1
+++ gnu/java/nio/channels/FileChannelImpl.java 9 Apr 2004 13:20:20
-0000
@@ -97,11 +97,9 @@
// However, this is necessary because if open() throws an exception
// we want to make sure this has the value -1. This is the most
// efficient way to accomplish that.
- int fd = -1;
+ private int fd = -1;
- int mode;
- int length;
- long pos;
+ private int mode;
public FileChannelImpl ()
{
@@ -120,19 +118,12 @@
private native int open (String path, int mode) throws
FileNotFoundException;
- /** Attach to an already-opened file. */
- public FileChannelImpl (int desc, int mode)
- {
- fd = desc;
- this.mode = mode;
- }
-
public native int available () throws IOException;
- private native long implPosition ();
- private native void seek (long newPosition);
- private native void implTruncate (long size);
+ private native long implPosition () throws IOException;
+ private native void seek (long newPosition) throws IOException;
+ private native void implTruncate (long size) throws IOException;
- public native void unlock (long pos, long len);
+ public native void unlock (long pos, long len) throws IOException;
public native long size () throws IOException;
@@ -356,7 +347,7 @@
* Otherwise return false.
*/
private native boolean lock(long position, long size,
- boolean shared, boolean wait);
+ boolean shared, boolean wait) throws
IOException;
public FileLock lock (long position, long size, boolean shared)
throws IOException
- FYI: Patch: FileChannelImpl,
Jeroen Frijters <=