static void writeObject(DataOutput out, BTXObject obj) throws IOException {
		writeString(out, obj.getName());
		out.writeInt(obj.getAttributeCount());
		{
			Iterator<BTXAttribute> attrs = obj.getAttributes();
			while (attrs.hasNext()) {
				writeAttribute(out, attrs.next());
			}
		}
		out.writeInt(obj.getChildrenCount());
		{
			Iterator<BTXObject> childs = obj.getChildren();
			while (childs.hasNext()) {
				writeObject(out, childs.next());
			}
		}
	}