< prev index next >

src/java.base/windows/native/libjava/io_util_md.h

Print this page
rev 11339 : 8072611: (process) ProcessBuilder redirecting output to file should work with long file names (win)
Reviewed-by: rriggs, simonis
Contributed-by: johannes.scheerer@sap.com, stuefe


  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #include "jni.h"
  27 #include "jni_util.h"
  28 
  29 /*
  30  * Macros to use the right data type for file descriptors
  31  */
  32 #define FD jlong
  33 
  34 /*
  35  * Prototypes for functions in io_util_md.c called from io_util.c,
  36  * FileDescriptor.c, FileInputStream.c, FileOutputStream.c

  37  */
  38 WCHAR* pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE);
  39 WCHAR* fileToNTPath(JNIEnv *env, jobject file, jfieldID id);
  40 WCHAR* getPrefixed(const WCHAR* path, int pathlen);
  41 WCHAR* currentDir(int di);
  42 int currentDirLength(const WCHAR* path, int pathlen);
  43 int handleAvailable(FD fd, jlong *pbytes);
  44 int handleSync(FD fd);
  45 int handleSetLength(FD fd, jlong length);
  46 JNIEXPORT jint handleRead(FD fd, void *buf, jint len);
  47 jint handleWrite(FD fd, const void *buf, jint len);
  48 jint handleAppend(FD fd, const void *buf, jint len);
  49 jint handleClose(JNIEnv *env, jobject this, jfieldID fid);
  50 jlong handleLseek(FD fd, jlong offset, jint whence);
  51 
  52 /*
  53  * Returns an opaque handle to file named by "path".  If an error occurs,
  54  * returns -1 and an exception is pending.
  55  */
  56 FD winFileHandleOpen(JNIEnv *env, jstring path, int flags);




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #include "jni.h"
  27 #include "jni_util.h"
  28 
  29 /*
  30  * Macros to use the right data type for file descriptors
  31  */
  32 #define FD jlong
  33 
  34 /*
  35  * Prototypes for functions in io_util_md.c called from io_util.c,
  36  * FileDescriptor.c, FileInputStream.c, FileOutputStream.c,
  37  * ProcessImpl_md.c
  38  */
  39 WCHAR* pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE);
  40 WCHAR* fileToNTPath(JNIEnv *env, jobject file, jfieldID id);
  41 WCHAR* getPrefixed(const WCHAR* path, int pathlen);
  42 WCHAR* currentDir(int di);
  43 int currentDirLength(const WCHAR* path, int pathlen);
  44 int handleAvailable(FD fd, jlong *pbytes);
  45 int handleSync(FD fd);
  46 int handleSetLength(FD fd, jlong length);
  47 JNIEXPORT jint handleRead(FD fd, void *buf, jint len);
  48 jint handleWrite(FD fd, const void *buf, jint len);
  49 jint handleAppend(FD fd, const void *buf, jint len);
  50 jint handleClose(JNIEnv *env, jobject this, jfieldID fid);
  51 jlong handleLseek(FD fd, jlong offset, jint whence);
  52 
  53 /*
  54  * Returns an opaque handle to file named by "path".  If an error occurs,
  55  * returns -1 and an exception is pending.
  56  */
  57 FD winFileHandleOpen(JNIEnv *env, jstring path, int flags);


< prev index next >