src/share/classes/java/io/RandomAccessFile.java

Print this page
rev 10457 : 8054720: Modifications of I/O methods for instrumentation purposes
Summary: Wrap some native methods in Java methods and change native method names to a consistent form.
Reviewed-by: TBD

@@ -294,11 +294,26 @@
      *
      * @param name the name of the file
      * @param mode the mode flags, a combination of the O_ constants
      *             defined above
      */
-    private native void open(String name, int mode)
+    private void open(String name, int mode) throws FileNotFoundException {
+        open0(name, mode);
+    }
+
+    /**
+     * Opens a file and returns the file descriptor.  The file is
+     * opened in read-write mode if the O_RDWR bit in {@code mode}
+     * is true, else the file is opened as read-only.
+     * If the {@code name} refers to a directory, an IOException
+     * is thrown.
+     *
+     * @param name the name of the file
+     * @param mode the mode flags, a combination of the O_ constants
+     *             defined above
+     */
+    private native void open0(String name, int mode)
         throws FileNotFoundException;
 
     // 'Read' primitives
 
     /**