indexOf(String, int)看看!
看看API怎么用的

解决方案 »

  1.   

    用Properties类
    FileInputStream lProFile = new FileInputStream(rCfgFile);
                Properties lProp=new Properties();
                lProp.load(lProFile);
                lProFile.close();
      

  2.   

    something like:
    // create and load properties
    Properties applicationProps = new Properties();
    FileInputStream in = new FileInputStream("www.txt");
    applicationProps.load(in);
    in.close();
    String lName = "sss";
    String lValue = (String) applicationProps.getProperty(lName);
    applicationProps.put(lName, lValue+",ddd");
    //store the modify
    FileOutputStream out = new FileOutputStream("www.txt");
    applicationProps.store(out, "---No Comment---");
    out.close();