keys() public method

public keys ( ) : List
return List
Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 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);
       }
 }