您好,欢迎访问一九零五行业门户网

如何使用Java创建PrintStream对象?

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);
以上就是如何使用java创建printstream对象?的详细内容。
其它类似信息

推荐信息