src/share/classes/java/io/FileInputStream.java

Print this page
rev 9260 : JDK-8033911: Simplify instrumentation of FileInputStream and RandomAccessFile
Reviewed-by:

@@ -184,11 +184,15 @@
      *
      * @return     the next byte of data, or <code>-1</code> if the end of the
      *             file is reached.
      * @exception  IOException  if an I/O error occurs.
      */
-    public native int read() throws IOException;
+    public int read() throws IOException {
+        return read0();
+    }
+
+    private native int read0() throws IOException;
 
     /**
      * Reads a subarray as a sequence of bytes.
      * @param b the data to be written
      * @param off the start offset in the data