?? bizconfig.java
字號:
package bizcape.com;
import javax.servlet.*;
import javax.servlet.http.*;
import java.lang.*;
import java.net.*;
import java.util.Properties;
import java.io.*;
public class BizConfig{
public static String fileName,sText;
public static int iMaxRecv,iMaxSize,iReqNum,iInterval;
public static String sRmtDef;
private static Properties defaultProperty = new Properties();
private static void setDefault(){
defaultProperty.setProperty("MaxRecv","50");
defaultProperty.setProperty("MaxXmlTextSize","2048");
defaultProperty.setProperty("RequestNum","80");
defaultProperty.setProperty("PollingInterval","1000");
defaultProperty.setProperty("RmtDefinition","file://zhanghz/D:/BizCape/RmtDefinition.xml");
}
public static boolean BizInit(){
try{
fileName=System.getProperty("bizprop","BizCape.prop");
setDefault();
InputStream in =new BufferedInputStream(new FileInputStream(fileName));
Properties prop=new Properties(defaultProperty);
prop.load(in);
if(!applyProperty(prop)){
System.err.println("applyProperty fail");
return false;
}
}catch (IOException e) {
System.err.println(e);
return false;
}
return true;
}
private static boolean applyProperty(Properties prop){
try{
iMaxRecv=Integer.valueOf(prop.getProperty("MaxRecv")).intValue();
iMaxSize=Integer.valueOf(prop.getProperty("MaxXmlTextSize")).intValue();
iReqNum=Integer.valueOf(prop.getProperty("RequestNum")).intValue();
iInterval=Integer.valueOf(prop.getProperty("PollingInterval")).intValue();
sRmtDef=prop.getProperty("RmtDefinition");
}catch(NumberFormatException e){
System.err.println(e.toString() + " : in file BizCape.prop");
return false;
}
return true;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -