public void storeFlattened(final OutputStream out) throws IOException {
    final Properties p = new Properties();
    for (Props curr = this; curr != null; curr = curr.getParent()) {
      for (final String key : curr.localKeySet()) {
        if (!p.containsKey(key)) {
          p.setProperty(key, get(key));
        }
      }
    }

    p.store(out, null);
  }
public void storeFlattened ( final OutputStream out ) throws IOException { final Properties p = new Properties ( ) ; for ( Props curr = this ; curr != null ; curr = curr . getParent ( ) ) { for ( final String key : curr . localKeySet ( ) ) { if ( ! p . containsKey ( key ) ) { p . setProperty ( key , get ( key ) ) ; } } } p . store ( out , null ) ; }
Store all properties, those local and also those in parent props

@param out The stream to write to
@throws IOException If there is an error writing