




















import java.util.*;
import java.io.*;
public class Test66{
public static void main(String[] args){
Properties pro = new Properties();
try{
pro.load(new FileInputStream("Test66.Properties"));
}catch(IOException e){
}
StringBuffer str = new StringBuffer(pro.getProperty("a")) ;
str.append(".this is a Test66");
str.delete(0,4);
str.insert(0,"this");
str.replace(40,50,"java");
pro.setProperty("a",str.toString());
try{
pro.store(new FileOutputStream("Test66_new.Properties"),null);
}catch(IOException e){
}
}
}
ps:
a = Here is an example of the contents of a properties file
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。