class ZipUtils {

  public static Set<String> unzipPathNames(BeanByteSource source) {
    ImmutableSet.Builder<String> entryNames = ImmutableSet.builder();
    try (ZipInputStream in = new ZipInputStream(source.openStream())) {
      ZipEntry entry = in.getNextEntry();
      while (entry != null) {
        validateZipPathName(DUMMY_PATH, entry);
        if (!entry.isDirectory()) {
          entryNames.add(entry.getName());
        }
        in.closeEntry();
        entry = in.getNextEntry();
      }
    } catch (IOException ex) {
      throw new UncheckedIOException(ex);
    }
    return entryNames.build();
  }

  private  ZipUtils();

}