⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basereaderdebug.java

📁 First of all, the Applet-phone is a SIP User-Agent with audio and text messaging capabilities. But
💻 JAVA
字号:
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);        }    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -