Examples of saveToString()


Examples of com.jcloisterzone.game.Snapshot.saveToString()

        }

        out.println("---------- save ------------");
        Snapshot snapshot = new Snapshot(game);
        snapshot.setGzipOutput(false);
        out.println(snapshot.saveToString());

        out.println("---------- system env ------------");
        out.println(System.getProperty("java.version"));
    }
View Full Code Here

Examples of org.bukkit.configuration.file.YamlConfiguration.saveToString()

          } else if (state instanceof InventoryHolder) {
            List<ItemStack> items = Arrays.asList(((InventoryHolder) block.getState()).getInventory().getContents());
            YamlConfiguration config = new YamlConfiguration();
            // Serialize to config, then store config in database
            config.set("items", items);
            dataStmt.setString(6, config.saveToString());
          } else if (state instanceof NoteBlock) {
            Note note = ((NoteBlock) block.getState()).getNote();
            dataStmt.setString(6, note.getTone().toString() + '\n' + note.getOctave() + '\n' + note.isSharped());
          } else if (state instanceof Jukebox) {
            dataStmt.setString(6, ((Jukebox) block.getState()).getPlaying().toString());
View Full Code Here

Examples of org.bukkit.configuration.file.YamlConfiguration.saveToString()

        for (TestColor testColor : examples) {
            Color base = Color.fromRGB(testColor.rgb);

            YamlConfiguration toSerialize = new YamlConfiguration();
            toSerialize.set("color", base);
            String serialized = toSerialize.saveToString();

            YamlConfiguration deserialized = new YamlConfiguration();
            deserialized.loadFromString(serialized);

            assertThat(testColor.name + " on " + serialized, base, is(deserialized.getColor("color")));
View Full Code Here

Examples of org.bukkit.configuration.file.YamlConfiguration.saveToString()

  }
 
  public final static String serializeCS(final ConfigurationSerializable o) {
    final YamlConfiguration y = new YamlConfiguration();
    y.set("value", o);
    return "" + y.saveToString();
  }
 
  @SuppressWarnings("unchecked")
  @Nullable
  public final static <T extends ConfigurationSerializable> T deserializeCS(final String s, final Class<T> c) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.