锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲少妇诱惑,国产美女撒尿一区二区,成r视频免费观看在线播放http://www.aygfsteel.com/lillian1205/category/42029.htmlzh-cnFri, 23 Oct 2009 05:38:59 GMTFri, 23 Oct 2009 05:38:59 GMT60璇誨啓inihttp://www.aygfsteel.com/lillian1205/articles/297552.htmllillianlillianFri, 09 Oct 2009 07:25:00 GMThttp://www.aygfsteel.com/lillian1205/articles/297552.htmlhttp://www.aygfsteel.com/lillian1205/comments/297552.htmlhttp://www.aygfsteel.com/lillian1205/articles/297552.html#Feedback0http://www.aygfsteel.com/lillian1205/comments/commentRss/297552.htmlhttp://www.aygfsteel.com/lillian1205/services/trackbacks/297552.html鐢≒roperties鍜孯andomAccessFile

1 Properties
    鐢≒roperties璇誨彇鐗瑰埆綆鍗曪紝浠ヤ笅鏄竴浜涘皬鏂規硶
    鍐欐枃浠剁殑鏃跺欑敤BufferedWriter鍙互鑷敱鎹㈣錛屼唬鏇挎崲琛岀 銆備絾鏄敤榪欑鏂規硶鍐欐枃浠朵細瑕嗙洊鎺夋枃浠跺師鏈夌殑鍐呭錛屼篃灝辨槸璇翠笉鑳芥弧瓚寵拷鍔犱俊鎭殑鍔熻兘
榪欏氨鐢ㄥ埌RandomAccessFile浜?br />


public class IniRead {
private static Properties ini = null;
    
//璁劇疆INI鏂囦歡
    static File file=new File("Config-澧炲姞.ini");
    
static {
        
try    {
            ini 
= new Properties ();
            
//鍔犺澆鏂囦歡
            ini.load (new FileInputStream (file));
        }
catch (Exception ex) {
            ex.printStackTrace();
        }

    }

    
private IniRead() {
    }

    
/**
     * 璇誨彇INI淇℃伅
     * 
*/

    
public static String getIniKey (String key) {
        
if(!ini.containsKey (key)) {
            
return "";
        }

        
return ini.get(key).toString ();
    }

    
/**
     * 淇敼INI淇℃伅
     * 
*/

    
public static void setIniKey (String key, String value) {
        
if(!ini.containsKey (key)) {
            
return;
        }

        ini.put (key, value);
    }

    
/**
     * 淇濆瓨INI淇℃伅
     * 
*/

    
public static void saveIni (String k[]) {
        
try    {
            FileWriter fw 
= new FileWriter ("ADViewer.ini");
            BufferedWriter bw 
= new BufferedWriter (fw);
            bw.newLine ();
            
for (int i = 0; i < k.length; i++{
                bw.write (k[i] 
+ "=" + getIniKey (k[i]));
                System.out.println(getIniKey (k[i]));
                bw.newLine ();
            }

            
            bw.close ();
            fw.close ();
        }
catch (Exception ex) {
            ex.printStackTrace();
        }

    }

}

    


2  RandomAccessFile
    涓杈硅涓杈瑰啓錛岃繕鑳界Щ鍔ㄦ寚閽?/p>

/*
     * 璇誨彇闇娣誨姞鐨刬ni鏂囦歡淇℃伅錛屽茍鍐欏叆鍒扮浉搴旂殑ini鏂囦歡涓?br />      
*/

    
public void write(String readFile, String writeFile) throws Exception {

        RandomAccessFile rafRead 
= new RandomAccessFile(readFile, mode);
        RandomAccessFile rafWrite 
= new RandomAccessFile(writeFile, mode);
        
//鎸夎璇誨彇
        String lineStr = rafRead.readLine();
        
while (lineStr != null{
            
// 鍐欏叆涓琛屽悗鎹㈣
            lineStr += "\r\n";
            
//灝嗘寚閽堢Щ鍔ㄥ埌鏂囦歡灝鵑儴
            rafWrite.seek(rafWrite.length());
            
//鍐欏叆璇誨彇鐨勪竴琛?/span>
            rafWrite.write(lineStr.getBytes());

            lineStr 
= rafRead.readLine();
        }


    }


lillian 2009-10-09 15:25 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 绥芬河市| 宜城市| 黔南| 宝山区| 台南县| 菏泽市| 甘谷县| 舞钢市| 防城港市| 宣城市| 师宗县| 辛集市| 丰城市| 得荣县| 大英县| 平江县| 资溪县| 崇礼县| 大化| 蓝山县| 江阴市| 英超| 黄冈市| 涟水县| 两当县| 全椒县| 长白| 新乡市| 中西区| 江达县| 仙居县| 军事| 文成县| 岚皋县| 逊克县| 临朐县| 保康县| 白玉县| 盐津县| 崇州市| 巩留县|