KLALB完全大重写,代码规范了,可以当作网络库使用

This commit is contained in:
Administrator
2023-06-23 08:34:15 +08:00
parent 0499ecb34d
commit f743b23e53
154 changed files with 2985 additions and 15058 deletions
@@ -1,36 +0,0 @@
package org.kne.cloud.network.klalb;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Properties;
public class ServerPropties extends Properties {
public ServerPropties() throws IOException {
super();
load();
}
public void load() throws IOException {
File f=new File("kserver.ini");
if(!f.exists()||f.length()==0) {
f.createNewFile();
PrintStream ps=new PrintStream(f);
ps.println("port=4569");
ps.close();
}
FileReader fr = null;
try {
fr=new FileReader(f);
load(fr);
}finally {
if(fr!=null)
fr.close();
}
}
public int getPort() {
return Integer.parseInt( (String) get("port"));
}
}