📄 variableconfig.java
字号:
package com.power.pipeengine.Variable;
/**
* Insert the type's description here.
* Creation date: (2/10/2002 9:38:12 AM)
* @author: Administrator
*/
import javax.swing.*;
import java.io.*;
import java.util.*;
public class VariableConfig
{
private String _token = ",";
private String _inDataDir = null;
//private String _inDataDir = "http://localhost/Scripts/ParaFileServer.dll?";
private String _outDataDir = null;
private String _validCharSet = "~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!$()/,.;@_`'{}|";
private String _url = "http://localhost:8080/servlet/com.power.servlet.ParaServlet";
private static final VariableConfig INSTANCE = new VariableConfig();
// Private constructor supresses
// default public constructor
private VariableConfig( ) {
FileReader fr = null;
String sep = File.separator;
/*try {
fr = new FileReader("C:\\jsdk2.1\\webpages\\GlobalConfig.txt");
} catch (FileNotFoundException e) {
System.out.println("Fail open server side config file: " + e);
}
try {
BufferedReader br = new BufferedReader(fr);
String strIn = br.readLine();
while (strIn !=null) {
StringTokenizer st = new StringTokenizer( strIn, "=" );
String key = new String( st.nextToken() );
if (key.equals("InDir")) {
_inDataDir = new String( st.nextToken() );
}
else if (key.equals("OutDir")) {
_outDataDir = new String( st.nextToken() );
}
else if (key.equals("token")) {
_token = new String( st.nextToken() );
}
else if (key.equals("URL")) {
//_url = new String( st.nextToken() );
}
strIn = br.readLine();
}
br.close();
} catch (IOException e) {
System.out.println(e);
JOptionPane.showMessageDialog(null, "Unable to open file GlobalConfig.txt.", "Fatal error", JOptionPane.ERROR_MESSAGE);
}*/
}
public int getCharSetLength() {
return _validCharSet.length();
}
public char getCodeAt( int i ) {
return _validCharSet.charAt( i );
}
public String getInputDirectory() {
return _inDataDir;
}
public static VariableConfig getInstance( ) {
return INSTANCE;
}
public String getOutputDirectory() {
return _outDataDir;
}
public String getSeparator() {
return _token;
}
/**
* Insert the method's description here.
* Creation date: (2/24/2002 6:09:32 PM)
* @return java.lang.String
*/
public String getURL() {
return _url;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -