分行读取

  1. Stringstr=(value==null)?"":value.toString();
  2. BufferedReaderbr=newBufferedReader(newStringReader(str));
  3. Stringline;
  4. Vectorv=newVector();
  5. try{
  6. while((line=br.readLine())!=null){
  7. v.addElement(line);
  8. }
  9. }catch(IOExceptionex){
  10. ex.printStackTrace();
  11. }

你可能感兴趣的:(读取)