标签:port orm lin java proc 转换流 upper buffer 文字
package test; import java.io.*; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; import java.util.zip.InflaterInputStream; import javax.annotation.processing.FilerException; import javax.management.RuntimeErrorException; import privateclass.Filterby_Name; import privateclass.Filterby_hidden; import privateclass.Filterby_java; import privateclass.MyBufferedReader; public class Main { private static final String space_operator = " "; private static final double pi = Math.PI; private static final String LINE_SEPARATOR = System.getProperty("line.separator"); public static void main(String[] args) throws Exception { PrintStream ps = new PrintStream(System.out); //write是将99的后面八位二进制数字写进了缓冲区 ps.write(99); ps.println(); //print是将文字原样输出 ps.print(99); /* * 可以接受字节流并且不用转换流转换 * 加上true就是便是自动刷新 */ BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in)); PrintWriter pw = new PrintWriter(System.out,true); /* *如果我们想打印到一个文件下面 *并且自动刷新 *PrintWriter pw = new PrintWriter(new FileWriter("My.txt"),true); */ String string = null; while((string = bfr.readLine()) != null) { if(string.equals("over"))break; pw.println(string.toUpperCase()); } pw.close(); bfr.close(); ps.close(); } }
标签:port orm lin java proc 转换流 upper buffer 文字
原文地址:https://www.cnblogs.com/WINDZLY/p/11823821.html