code: @Override
      public void write(DataOutput out) throws IOException
      {
          addSignatureIfNeed();
          out.writeInt(magic);
          out.writeShort(minor_version);
          out.writeShort(major_version);
          out.writeShort(constant_pool.size()+1);
          for (ConstantInfo ci : constant_pool)
          {
              ci.write(out);
          }
          int modifier = ClassFlags.getModifier(getModifiers());
          modifier |= ClassFlags.ACC_SYNTHETIC | ClassFlags.ACC_PUBLIC | ClassFlags.ACC_SUPER;
          out.writeShort(modifier);
          out.writeShort(this_class);
          out.writeShort(super_class);
          out.writeShort(interfaces.size());
          for (int ii : interfaces)
          {
              out.writeShort(ii);
          }
          out.writeShort(fields.size());
          for (FieldInfo fi : fields)
          {
              fi.write(out);
          }
          out.writeShort(methods.size());
          for (MethodInfo mi : methods)
          {
              mi.write(out);
          }
          out.writeShort(attributes.size());
          for (AttributeInfo ai : attributes)
          {
              ai.write(out);
          }
  
      }
docs: Writes the class
  @param out
  @throws IOException