files.java
来自「网上办公管理系统。模拟主流网站办公管理系统的基本业务流程。」· Java 代码 · 共 44 行
JAVA
44 行
/*
* Created on 2004-9-18
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package oa.sys;
import java.io.*;
import java.util.*;
public class Files {
Properties prop=new Properties();
private String name=null;
private String password=null;
private String error=null;
public Files(String path){
try{
File file=new File(path+"WEB-INF\\admin.properties");
if(file.canRead()){
FileInputStream infile=new FileInputStream(file);
prop.load(infile);
name=prop.getProperty("name");
password=prop.getProperty("password");
prop.clear();
infile.close();
}else{
error=file.getPath()+"没找到文件";
}
}catch(Exception e){
}
}
public String getName(){
return name;
}
public String getPassword(){
return password;
}
public String getError(){
return error;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?