PipedInputStream in = new PipedInputStream();
PipedOutputStream out = new PipedOutputStream(in);
new Thread(
() -> {
try {
''''''''' //写入输出流
out.close();
} catch (IOException | DocumentException e) {
throw new RuntimeException(e);
}
}
).start();
//输入流in 处理