Using a numbered file descriptor from Java
问题 I need to access numbered file descriptors from Java -- other than 0, 1 or 2. How can this be done? I looked at the FileDescriptor class but did'nt find any way to initialize it with a given file descriptor number. As a concrete example lets suppose Java gets called as a child process from another programing language. File descriptors 3 and 4 are provided by the other language for input and output. What I need in Java are InputStream and OutputStream objects connected to these file