你在hashtable中存放格式:Value.value ---4
Value.time-----9
STORE.values---StoreTest
STORE.color----Blue再下面应该不用我再说了吧!(就是读取hashtable中的内容了)呵呵!这下没有问题了吧!
Value.time-----9
STORE.values---StoreTest
STORE.color----Blue再下面应该不用我再说了吧!(就是读取hashtable中的内容了)呵呵!这下没有问题了吧!
...StingTokenizer st=new StingTokenizer( strFile , "\r\n" );
while( st.hasMoreTokens()){
String line = st.nextToken().trim();
if(line.length()==0)continue;
if(line.startsWith( "[" ) && line.endsWith( "]" )){
System.out.println( "段:"+line.substring( 1 , line.length()-1 ));
} else {
int equpos = line.indexOf( "=" );
if( equpos==-1 )continue;
System.out.println( "键:"+line.substring( 0 , equpos )+" = " + line.substring( equpos+1 , line.length() ));
}
}