看名字,应该是取得子进程的输出流,不过看了Java官方的解释,一头雾水,怎么又和输入流扯上了?通过管道重定向到了某个进程的输入流?返回值是与子进程的正常输入相关的输出流?到底是什么流?哪位高手能解释一下?getOutputStreampublic abstract OutputStream getOutputStream()
Gets the output stream of the subprocess. Output to the stream is piped into the standard input stream of the process represented by this Process object.
Implementation note: It is a good idea for the output stream to be buffered.Returns:
the output stream connected to the normal input of the subprocess.
Gets the output stream of the subprocess. Output to the stream is piped into the standard input stream of the process represented by this Process object.
Implementation note: It is a good idea for the output stream to be buffered.Returns:
the output stream connected to the normal input of the subprocess.
我初学Java,不过感觉这应该是一个比较基本的函数,没有人知道吗
public abstract OutputStream getOutputStream()获取子进程的输出流。输出流被传送给由该 Process 对象表示的进程的标准输入流。
实现注意事项:对输出流进行缓冲是一个好主意。
返回:
连接到子进程正常输入的输出流。