code: public static void serialize(final File file, final ClassHierarchy classHierarchy) throws IOException {
      final ClassHierarchyProto.Node node = serializeNode(classHierarchy.getNamespace());
      try (final FileOutputStream output = new FileOutputStream(file)) {
        try (final DataOutputStream dos = new DataOutputStream(output)) {
          node.writeTo(dos);
        }
      }
    }
docs: serialize a class hierarchy into a file.
  
  @param file
  @param classHierarchy
  @throws IOException
  @deprecated in 0.12. Use AvroClassHierarchySerializer instead