diff --git a/make/mapfiles/libjava/mapfile-vers b/make/mapfiles/libjava/mapfile-vers index d2d8067395c3983b09e857976e26ec276f73e9ce..e6fd0f53fd08d1fc8d0fc241b27d3b726326b9ab 100644 --- a/make/mapfiles/libjava/mapfile-vers +++ b/make/mapfiles/libjava/mapfile-vers @@ -79,7 +79,7 @@ SUNWprivate_1.1 { Java_java_io_FileInputStream_close0; Java_java_io_FileInputStream_initIDs; Java_java_io_FileInputStream_open; - Java_java_io_FileInputStream_read; + Java_java_io_FileInputStream_read0; Java_java_io_FileInputStream_readBytes; Java_java_io_FileInputStream_skip; Java_java_io_FileOutputStream_close0; @@ -98,11 +98,11 @@ SUNWprivate_1.1 { Java_java_io_RandomAccessFile_initIDs; Java_java_io_RandomAccessFile_length; Java_java_io_RandomAccessFile_open; - Java_java_io_RandomAccessFile_read; + Java_java_io_RandomAccessFile_read0; Java_java_io_RandomAccessFile_readBytes; Java_java_io_RandomAccessFile_seek0; Java_java_io_RandomAccessFile_setLength; - Java_java_io_RandomAccessFile_write; + Java_java_io_RandomAccessFile_write0; Java_java_io_RandomAccessFile_writeBytes; Java_java_io_UnixFileSystem_canonicalize0; Java_java_io_UnixFileSystem_checkAccess; diff --git a/src/share/classes/java/io/FileInputStream.java b/src/share/classes/java/io/FileInputStream.java index 3e67fb8551501c16a411db54e87881fbaaecfc4e..438da6efc02db4772516897bf21a04b52afa796d 100644 --- a/src/share/classes/java/io/FileInputStream.java +++ b/src/share/classes/java/io/FileInputStream.java @@ -186,7 +186,11 @@ class FileInputStream extends InputStream * 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. diff --git a/src/share/classes/java/io/RandomAccessFile.java b/src/share/classes/java/io/RandomAccessFile.java index c48aa99b32f7c1919a527c4ee3cd5a31f8c7db51..dc208125c2bd9764bc0696752c8b31368ccf3014 100644 --- a/src/share/classes/java/io/RandomAccessFile.java +++ b/src/share/classes/java/io/RandomAccessFile.java @@ -309,7 +309,11 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * @exception IOException if an I/O error occurs. Not thrown if * end-of-file has been reached. */ - public native int read() throws IOException; + public int read() throws IOException { + return read0(); + } + + private native int read0() throws IOException; /** * Reads a sub array as a sequence of bytes. @@ -457,7 +461,11 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * @param b the {@code byte} to be written. * @exception IOException if an I/O error occurs. */ - public native void write(int b) throws IOException; + public void write(int b) throws IOException { + write0(b); + } + + private native void write0(int b) throws IOException; /** * Writes a sub array as a sequence of bytes. diff --git a/src/share/native/java/io/FileInputStream.c b/src/share/native/java/io/FileInputStream.c index 52e2cdd8e6b30f8d2a34827c039ec133e7d58bd7..092ddbf6f1f8eb3311dd499cef26ab20018db956 100644 --- a/src/share/native/java/io/FileInputStream.c +++ b/src/share/native/java/io/FileInputStream.c @@ -62,7 +62,7 @@ Java_java_io_FileInputStream_open(JNIEnv *env, jobject this, jstring path) { } JNIEXPORT jint JNICALL -Java_java_io_FileInputStream_read(JNIEnv *env, jobject this) { +Java_java_io_FileInputStream_read0(JNIEnv *env, jobject this) { return readSingle(env, this, fis_fd); } diff --git a/src/share/native/java/io/RandomAccessFile.c b/src/share/native/java/io/RandomAccessFile.c index 3251db87fb993b3ec85648adeebc56688dfa5190..53b5f1aac1f50bd798808b6b472f63ddd4dacef5 100644 --- a/src/share/native/java/io/RandomAccessFile.c +++ b/src/share/native/java/io/RandomAccessFile.c @@ -64,7 +64,7 @@ Java_java_io_RandomAccessFile_open(JNIEnv *env, } JNIEXPORT jint JNICALL -Java_java_io_RandomAccessFile_read(JNIEnv *env, jobject this) { +Java_java_io_RandomAccessFile_read0(JNIEnv *env, jobject this) { return readSingle(env, this, raf_fd); } @@ -75,7 +75,7 @@ Java_java_io_RandomAccessFile_readBytes(JNIEnv *env, } JNIEXPORT void JNICALL -Java_java_io_RandomAccessFile_write(JNIEnv *env, jobject this, jint byte) { +Java_java_io_RandomAccessFile_write0(JNIEnv *env, jobject this, jint byte) { writeSingle(env, this, byte, JNI_FALSE, raf_fd); }