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

📄 comtool.java

📁 用java实现的一个bbs的portal
💻 JAVA
字号:
/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: Sep 18, 2003
 * Time: 1:48:28 PM
 * To change this template use Options | File Templates.
 */
package Kernel;

import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.Logger;

public class comTool {

    public static Logger SpiderLog = Logger.getLogger("Spider");
    public static Logger ServerAdapterLog = Logger.getLogger("ServerAdapter");
    private static final String propertiesfile = "log4j.properties";

    public static void initLog(){
        PropertyConfigurator.configure(propertiesfile);
    }

    public static String getChineseStr(String temp)
    {
        if (1 ==1){

            return temp;
        };
        //the fellowing code will not executed.
        String dbstr="";
        try{
            if (temp!=null)
            {
                byte[] dbbyte=temp.getBytes("iso-8859-1");
                dbstr=new String(dbbyte,"gb2312");
            }else {
                dbstr=" ";
            }
        }
        catch(Exception e){
            return temp;
        }
        return dbstr;
    }
}

⌨️ 快捷键说明

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