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

📄 mconfig.java

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

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 String host;
private String targetHost;
private int port;
private int targetPort;
//-----------------------------------------------------------------------------------
private MConfig()
{
	// privatge !
}
//-----------------------------------------------------------------------------------
public static MConfig getInstance()
{
return instance;
}
//-----------------------------------------------------------------------------------
public void load( String configFileName )
throws IOException
{
configFile = new File( configFileName );

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

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

port		= Integer.parseInt( prop.getProperty( "port" ) );
targetPort	= Integer.parseInt( prop.getProperty( "targetPort" ) );
host		= prop.getProperty( "host" );
targetHost	= prop.getProperty( "targetHost" );
}
//-----------------------------------------------------------------------------------
public String getLogFileName()
{
return logFileName;
}
//-----------------------------------------------------------------------------------
public int getThreadCount()
{
return threadCount;
}
//-----------------------------------------------------------------------------------
public String getHost() {
	return host;
}

public int getPort() {
	return port;
}

public String getTargetHost() {
	return targetHost;
}

public int getTargetPort() {
	return targetPort;
}

}

⌨️ 快捷键说明

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