public void store(OutputStream out,String header) throws IOException {
  PrintWriter writer=new PrintWriter(new OutputStreamWriter(out,"ISO-8859-1"));
  String line;
  String key;
  StringBuffer s=new StringBuffer();
  for (int i=0; i < lineData.size(); i++) {
    line=(String)lineData.get(i);
    key=(String)keyData.get(i);
    if (key.length() > 0) {
      formatForOutput(key,s,true);
      s.append('=');
      formatForOutput((String)get(key),s,false);
      writer.println(s);
    }
 else {
      writer.println(line);
    }
  }
  writer.flush();
}

public void store ( OutputStream out , String header ) throws IOException { PrintWriter writer = new PrintWriter ( new OutputStreamWriter ( out , "ISO-8859-1" ) ) ; String line ; String key ; StringBuffer s = new StringBuffer ( ) ; for ( int i = 0 ; i < lineData . size ( ) ; i ++ ) { line = ( String ) lineData . get ( i ) ; key = ( String ) keyData . get ( i ) ; if ( key . length ( ) > 0 ) { formatForOutput ( key , s , true ) ; s . append ( '=' ) ; formatForOutput ( ( String ) get ( key ) , s , false ) ; writer . println ( s ) ; } else { writer . println ( line ) ; } } writer . flush ( ) ; }
write the properties to the specified outputstream . overloads the store method in properties so we can put back comment and blank lines .
