?? basereaderdebug.java
字號(hào):
package gov.nist.examples.bps.reader;import java.io.*;/** Debugging println.**@version JAIN-SIP-1.1**@author Olivier Deruelle <deruelle@nist.gov> <br/>**<a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a>**/public class BaseReaderDebug { public static boolean debug; private static String proxyOutput=null; private static PrintStream stream=System.out; public static void setProxyOutputFile(String proxyOut) { System.out.println("We set the base reader output file to: "+proxyOut); proxyOutput=proxyOut; } public static void writeFile(String inFile,String outFile, String text, boolean sep) { // we read this file to obtain the options try{ FileWriter fileWriter = new FileWriter(outFile,true); PrintWriter pw = new PrintWriter(fileWriter,false); if (text==null) { pw.println(); } else if (sep) { pw.print(text); } else { pw.println(text); } pw.close(); fileWriter.close(); } catch(Exception e) { e.printStackTrace(); } } public static void logException(Exception ex) { if (debug) { ex.printStackTrace(stream); } } public static void println(String text){ if (debug) { if (proxyOutput!=null) writeFile(proxyOutput,proxyOutput,text,false); else stream.println(text); } } public static void println(){ if (debug) { if (proxyOutput!=null) writeFile(proxyOutput,proxyOutput,null,false); else stream.println(); } } public static void print(String text){ if (debug) { if (proxyOutput!=null) writeFile(proxyOutput,proxyOutput,text,true); else stream.print(text); } } }
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -