--- old/src/java.base/unix/native/libjava/FileInputStream_md.c 2016-08-25 17:51:54.174564700 -0700 +++ new/src/java.base/unix/native/libjava/FileInputStream_md.c 2016-08-25 17:51:54.070564699 -0700 @@ -37,12 +37,33 @@ #include "java_io_FileInputStream.h" extern jfieldID fis_fd; /* id for jobject 'fd' in java.io.FileInputStream */ +extern jfieldID fis_pgsz; /* id for jobject 'pageSize' in java.io.FileInputStream */ /********************************************************************* * Platform specific implementation of input stream native methods */ JNIEXPORT void JNICALL +Java_java_io_FileInputStream_open0(JNIEnv *env, jobject this, jstring path, jboolean direct) { + if (direct) { + fileOpen(env, this, path, fis_fd, O_RDONLY | O_DIRECT); + } else { + fileOpen(env, this, path, fis_fd, O_RDONLY); + } +} + +JNIEXPORT void JNICALL Java_java_io_FileInputStream_close0(JNIEnv *env, jobject this) { fileClose(env, this, fis_fd); } + +JNIEXPORT jint JNICALL +Java_java_io_FileInputStream_readBytesD(JNIEnv *env, jobject this, + jbyteArray bytes, jint off, jint len) { + return readBytesD(env, this, bytes, off, len, fis_fd, fis_pgsz); +} + +JNIEXPORT jint JNICALL +Java_java_io_FileInputStream_getPageSize0(JNIEnv *env, jobject this) { + return getpagesize(); +}