private void writeKeysWithPrefix(String prefix,String exclude){
  for (  String key : keys) {
    if (key.startsWith(prefix) && !key.startsWith(exclude)) {
      ps.println(key + "=" + prop.getProperty(key));
    }
  }
  ps.println();
}

private void writeKeysWithPrefix ( String prefix , String exclude ) { for ( String key : keys ) { if ( key . startsWith ( prefix ) && ! key . startsWith ( exclude ) ) { ps . println ( key + "=" + prop . getProperty ( key ) ) ; } } ps . println ( ) ; }
writes all keys starting with the specified prefix and not starting with the exclude prefix in alphabetical order .
