code: public void write(Output dest) throws IOException {
          int i, max;
  
          dest.writeU2(Access.toFlags(accessFlags));
          dest.writeClassRef(thisClass);
          if (superClass != null) {
              dest.writeClassRef(superClass);
          } else {
              dest.writeU2(0);
          }
  
          max = interfaces.size();
          dest.writeU2(max);
          for (i = 0; i < max; i++) {
              dest.writeClassRef(interfaces.get(i));
          }
          max = fields.size();
          dest.writeU2(max);
          for (i = 0; i < max; i++) {
              fields.get(i).write(dest);
          }
          max = methods.size();
          dest.writeU2(max);
          for (i = 0; i < max; i++) {
              methods.get(i).write(dest);
          }
          max = attributes.size();
          dest.writeU2(max);
          for (i = 0; i < max; i++) {
              attributes.get(i).write(dest);
          }
      }
docs: Write this class file to the specified output stream.