?? calllauncherdebug.java
字號:
package gov.nist.examples.pcc;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 CallLauncherDebug { public static boolean debug=true; private static String callLauncherOutput; private static PrintStream stream=System.out; public static void setCallLauncherOutputFile(String callLauncherOut) { callLauncherOutput=callLauncherOut; } 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 (callLauncherOutput!=null) writeFile(callLauncherOutput,callLauncherOutput,text,false); else stream.println(text); } } public static void println(){ if (debug) { if (callLauncherOutput!=null) writeFile(callLauncherOutput,callLauncherOutput,null,false); else stream.println(); } } public static void print(String text){ if (debug) { if (callLauncherOutput!=null) writeFile(callLauncherOutput,callLauncherOutput,text,true); else stream.print(text); } } }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -