Пример #1
0
 public static void writeSettingsToStream(Settings settings, StreamOutput out) throws IOException {
   out.writeVInt(settings.getAsMap().size());
   for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
     out.writeString(entry.getKey());
     out.writeString(entry.getValue());
   }
 }
Пример #2
0
 /** Sets all the provided settings. */
 public Builder put(Settings settings) {
   map.putAll(settings.getAsMap());
   classLoader = settings.getClassLoaderIfSet();
   return this;
 }