1、将输出流out作为PrintStream的输出流,不会自动flush,采用默认字符集。

PrintStream out = new PrintStream(OutputStream out);

2、创建File对应的FileOutputstream,然后将FileOutputstream作为Printstream的输出流。

PrintStream out = new PrintStream(File file);

创建Filename对应的FileOutputStream,然后将FileoutputStream作为PrintStream的输出流。

PrintStream out = new PrintStream(String fileName, String charsetName);
本文转载于:https://www.yisu.com/zixun/583704.html 如有侵犯,请联系zhengruancom@outlook.com删除。
免责声明:正软商城发布此文仅为传递信息,不代表正软商城认同其观点或证实其描述。