private void writeNode(DataWriter out, Node<T> node) throws IOException {
        T type = node.data();
        out.writeStruct(type);

        int numChildren = node.size();
        out.writeInt(numChildren);

        for (Node child : node) {
            writeNode(out, child);
        }
    }
@author Nico Bergemann <barracuda415 at yahoo.de>
disunity-core/src/main/java/info/ata4/junity/serialize/typetree/TypeTreeV1.java