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

📄 mconfig.java

📁 httptunnel.jar httptunnel java 源码
💻 JAVA
字号:
package net.jumperz.app.MBangzone;

import java.io.*;
import java.util.*;

public class MConfig
{
private static MConfig instance = new MConfig();

private File configFile;
private Properties prop;
private int threadCount;
private String logFileName;
private boolean useProxy;
private String proxyHost;
private int proxyPort;

//-----------------------------------------------------------------------------------
private MConfig()
{
}
//-----------------------------------------------------------------------------------
public static MConfig getInstance()
{
return instance;
}
//-----------------------------------------------------------------------------------
public void load( String configFileName )
throws Exception
{
configFile = new File( configFileName );

prop = new Properties();
prop.load( new FileInputStream( configFile ) );

threadCount			= Integer.parseInt( prop.getProperty( "threadCount" ) );
logFileName			= prop.getProperty( "logFileName" );

if( prop.containsKey( "useProxy" ) )
	{
	useProxy = Boolean.valueOf( prop.getProperty( "useProxy" ) ).booleanValue();
	if( useProxy == true )
		{
		proxyHost = prop.getProperty( "proxyHost" );
		proxyPort = Integer.parseInt( prop.getProperty( "proxyPort" ) );
		}
	}
}
//-----------------------------------------------------------------------------------
public String getLogFileName()
{
return logFileName;
}
//-----------------------------------------------------------------------------------
public int getThreadCount()
{
return threadCount;
}
//-----------------------------------------------------------------------------------
public boolean getUseProxy()
{
return useProxy;
}
//-----------------------------------------------------------------------------------
public String getProxyHost()
{
return proxyHost;
}
//-----------------------------------------------------------------------------------
public int getProxyPort()
{
return proxyPort;
}
//-----------------------------------------------------------------------------------

}

⌨️ 快捷键说明

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