- public void putSerializable(String key, Serializable object) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- try {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
-
- oos.writeObject(object);
- byte[] bytes = baos.toByteArray();
-
- putBytes(key, bytes);
- } catch (IOException ie) {
- debug("set_state failed %s\n", ie.toString());
- }
+ public void putJson(String key, AltosJson j) {
+ putString(key, j.toString());