?? files.java
字號:
/*
* 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.*;
/**
****************************************************
*類名稱: Files<br>
*類功能: 獲取文件操作<br>
*創(chuàng)建: 白偉明 2004年9月23日<br>
****************************************************
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Files {
Properties prop=new Properties();
private String name=null;
private String password=null;
private String error=null;
/***************************************************
*函數(shù)名稱: Files()<br>
*函數(shù)功能: 獲取屬性文件<br>
*返回值: 無<br>
*參數(shù)說明: path 文件路徑<br>
*創(chuàng)建: 白偉明 2004年9月22日
****************************************************/
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;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -