code: private List<String> listResources(JarInputStream jar, String path) throws IOException {
          // Include the leading and trailing slash when matching names
          if (!path.startsWith(PATH_SP)) {
              path = PATH_SP + path;
          }
          if (!path.endsWith(PATH_SP)) {
              path = path + PATH_SP;
          }
  
          // Iterate over the entries and collect those that begin with the requested path
          List<String> resources = new ArrayList<String>();
          for (JarEntry entry; (entry = jar.getNextJarEntry()) != null;) {
              if (!entry.isDirectory()) {
                  // Add leading slash if it's missing
                  String name = entry.getName();
                  StringBuilder sb = new StringBuilder("");
                  if (!name.startsWith(PATH_SP)) {
                      name = sb.append(PATH_SP).append(name).toString();
                  }
  
                  // Check file name
                  if (name.startsWith(path)) {
                      // Trim leading slash
                      resources.add(name.substring(1));
                  }
              }
          }
          return resources;
      }
docs: List the names of the entries in the given {@link JarInputStream} that begin with the
  specified {@code path}. Entries will match with or without a leading slash.
  
  @param jar The JAR input stream
  @param path The leading path to match
  @return The names of all the matching entries
  @throws IOException If I/O errors occur