private void createJar(String className, OutputStream outStream, byte[] bytes)
      throws IOException {
    JarOutputStream jarOutputStream = new JarOutputStream(outStream);

    // Add the class file to the JAR file
    String formattedName = className;
    if (!formattedName.endsWith(".class")) {
      formattedName = formattedName.concat(".class");
    }

    JarEntry entry = new JarEntry(formattedName);
    entry.setTime(System.currentTimeMillis());
    jarOutputStream.putNextEntry(entry);
    jarOutputStream.write(bytes);
    jarOutputStream.closeEntry();

    jarOutputStream.close();
  }
Write a JAR with a class of the given name with the provided content. The className may have a
package separated by /. For example: my/package/myclass

@param className Name of the class to create
@param content Content of the created class
@param outStream Stream to write the JAR to
@throws IOException If there is a problem creating the output stream for the JAR file.
geode-junit/src/main/java/org/apache/geode/test/compiler/ClassBuilder.java