code: private void writeClass(File directory, String name, ByteBuffer def, byte[] digest) {
      String baseName = getBaseFileName(name);
      File classFile = new File(directory, baseName + CLASS_EXTENSION);
      File digestFile = new File(directory, baseName + DIGEST_EXTENSION);
  
      try {
        FileUtil.setFileContents(classFile, def, true);
        FileUtil.setFileContents(digestFile, digest, true);
      } catch (IOException e) {
        e.printStackTrace();
        classFile.delete();
        digestFile.delete();
      }
    }
docs: Writes a class definition.
  @param directory The directory under which to write the class
  definition.
  @param name The fully qualified name of the class.
  @param def A <code>ByteBuffer</code> containing the class definition.
  @param digest The MD5 digest of the class definition.