public void trim(){
  for (  String key : keyNames()) {
    String value=(String)properties.get(key);
    if (value != null)     properties.put(key,value.trim());
  }
}

public void trim ( ) { for ( String key : keyNames ( ) ) { String value = ( String ) properties . get ( key ) ; if ( value != null ) properties . put ( key , value . trim ( ) ) ; } }
trims all property values to remove leading and trailing whitespace .
