if (r == null) {
r = (ContentResource)c.createChild("placemarks.xml", Type.RESOURCE);
PlacemarkList placemarkList = new PlacemarkList();
ByteArrayOutputStream os = new ByteArrayOutputStream();
Writer w = new OutputStreamWriter(os);
placemarkList.encode(w);
r.put(os.toByteArray());
}
return r;
}