public virtual OutStream writeProps(Map props, bool cls) { Charset origCharset = charset(); charset(Charset.utf8()); try { List keys = props.keys().sort(); int size = keys.sz(); long eq = '='; long nl = '\n'; for (int i = 0; i < size; ++i) { string key = (string)keys.get(i); string val = (string)props.get(key); writePropStr(key); writeChar(eq); writePropStr(val); writeChar(nl); } return(this); } finally { try { if (cls) { close(); } } catch (System.Exception e) { Err.dumpStack(e); } charset(origCharset); } }
public virtual OutStream writeProps(Map props, bool cls) { Charset origCharset = charset(); charset(Charset.utf8()); try { List keys = props.keys().sort(); int size = keys.sz(); long eq = '='; long nl = '\n'; for (int i=0; i<size; ++i) { string key = (string)keys.get(i); string val = (string)props.get(key); writePropStr(key); writeChar(eq); writePropStr(val); writeChar(nl); } return this; } finally { try { if (cls) close(); } catch (System.Exception e) { Err.dumpStack(e); } charset(origCharset); } }