code: private byte[] readClassData(JavaFileObject classFile) throws IOException {
          ByteArrayOutputStream bos = new ByteArrayOutputStream();
          byte[] buf = new byte[4096];
          InputStream classStream = classFile.openInputStream();
          int n = classStream.read(buf);
          while (n > 0) {
              bos.write(buf, 0, n);
              n = classStream.read(buf);
          }
          classStream.close();
          return bos.toByteArray();
      }
docs: Reads all class file data into a byte array from the given file
  object.
  
  @param classFile the class file to read.
  @return the class data.
  @throws IOException if an I/O error occurs.