< prev index next >

src/java.base/unix/native/libjava/FileInputStream_md.c

Print this page

        

@@ -35,14 +35,35 @@
 #include "io_util_md.h"
 
 #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();
+}
< prev index next >