OutputStream processOut = process.getOutputStream();
BinaryStream stream = FileModule.fopen(env, name, mode, false, null);
if (stream instanceof FileInput) {
FileInput file = (FileInput) stream;
int ch;
while ((ch = file.read()) >= 0) {
processOut.write(ch);
}
}
stream.close();