private void writeMethods() throws IOException {
   for (MethodInfo method : methods) {
     os.writeShort(method.getAccessFlags());
     os.writeShort(method.getNameIndex());
     os.writeShort(method.getDescriptorIndex());
     os.writeShort(method.getAttributes().length);
     attributeFacility.writeAttributes(method.getAttributes());
   }
 }