code: public void createDirectoryEntries(JarOutputStream jarStream, String packageName) throws IOException {
          StringBuilder entryName = new StringBuilder(packageName.length());
          for (String str : packageName.split("\\.")) {
              entryName.append(str).append("/");
              JarEntry jarEntry = new JarEntry(entryName.toString());
              jarStream.putNextEntry(jarEntry);
          }
      }
docs: Create the jar directory entries corresponding to the specified package
  name.
  
  @param jarStream   the target jar's output stream
  @param packageName the target package name
  
  @throws IOException if an IO exception raised while creating the entries