Checks if the ZIP file contains the given entry.

@param zip
ZIP file.
@param name
entry name.
@return <code>true</code> if the ZIP file contains the given entry.
18811
public static boolean containsEntry(File zip, String name) {
    ZipFile zf = null;
    try {
      zf = new ZipFile(zip);
      return zf.getEntry(name) != null;
    }
    catch (IOException e) {
      throw ZipExceptionUtil.rethrow(e);
    }
    finally {
      closeQuietly(zf);
    }
  }
1269753
public static int getCompressionMethodOfEntry(File zip, String name) {
    ZipFile zf = null;
    try {
      zf = new ZipFile(zip);
      ZipEntry zipEntry = zf.getEntry(name);
      if (zipEntry == null) {
        return -1;
      }
      return zipEntry.getMethod();
    }
    catch (IOException e) {
      throw ZipExceptionUtil.rethrow(e);
    }
    finally {
      closeQuietly(zf);
    }
  }
925171
public boolean accept(File dir, String name)
  {
    for (List<String> pattern : _patterns)
    {
      boolean match = match(pattern, name);
      if (match)
        return !_exclude;
    }
    return _exclude;
  }
554510
@Override
    public boolean contains(DelayedEntry entry) {
        Data key = (Data) entry.getKey();
        return index.containsKey(key);
    }
240696
public boolean hasProperty(final String name) {
        return System.getProperties().containsKey(name) || props.containsKey(name);
    }
837452
boolean isAttribute(String name)
    {
        if (attributes.containsKey(name))
            return true;
        return noStroke.containsKey(name);
    }
923587
public static boolean isSegmentsFile(String name) {
    return name.startsWith(IndexFileNames.SEGMENTS)
        && !name.equals(IndexFileNames.SEGMENTS_GEN);
  }
986825
protected void writeFile2Zip(CmsFile file, String name) throws IOException {

        ZipEntry entry = new ZipEntry(name);
        // save the time of the last modification in the zip
        entry.setTime(file.getDateLastModified());
        m_exportZipStream.putNextEntry(entry);
        m_exportZipStream.write(file.getContents());
        m_exportZipStream.closeEntry();
    }
935924
public static boolean isValidFileName(@Nullable String name) {
        return !TextUtils.isEmpty(name)
                && !name.contains("/")
                && !name.equals(".")
                && !name.equals("..");
    }
725445
public static boolean replaceEntry(final File zip, final ZipEntrySource entry) {
    return operateInPlace(zip, new InPlaceAction() {
      public boolean act(File tmpFile) {
        return replaceEntry(zip, entry, tmpFile);
      }
    });
  }
175040
public static boolean zipFolder(File folder, String fileName){
		boolean success = false;
		if(!folder.isDirectory()){
			return false;
		}
		
		if(fileName == null){
			fileName = folder.getAbsolutePath()+ZIP_EXT;
		}
		
		ZipArchiveOutputStream zipOutput = null;
		try {
			zipOutput = new ZipArchiveOutputStream(new File(fileName));
			
			success = addFolderContentToZip(folder,zipOutput,"");

			zipOutput.close();
		
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}
		finally{
			try {
				if(zipOutput != null){
					zipOutput.close();
				}
			} catch (IOException e) {}
		}
		return success;
	}
494399
static boolean isBadCase(String name)
    {
        EnumItem<NS> nrEnumItem = dictionary.get(name);
        if (nrEnumItem == null) return false;
        return nrEnumItem.containsLabel(NS.Z);
    }
436649
private boolean isContentTypeIn(ZipInputStream stream) throws IOException {
		boolean isContentType = false;
		if (this.innerFile != null) {
			final String strInner = this.innerFile.toString();
			InputStream dataStream = null;
			ZipEntry zipEntry = stream.getNextEntry();
			while (zipEntry != null && dataStream == null) {
				if (strInner.equals(zipEntry.getName())) {
					dataStream = stream;
				} else {
					zipEntry = stream.getNextEntry();
				}
			}
			if (dataStream != null) {
				isContentType = isContentType(stream, zipEntry, dataStream);
			}
		} else {
			isContentType = isContentType(stream, null, null);
		}
		return isContentType;
	}
736683
public boolean hasProperty(String name) {
        return this.properties.stream().filter(p -> p.getName().equals(name)).findFirst().isPresent();
    }
234680
@Override
    public boolean containsAttribute(final String name) {
        CommonHelper.assertNotNull("name", name);
        return this.attributes.containsKey(name);
    }
993652
public boolean hasName(String name, String namespace) {
        return hasName(name) && Objects.equals(this.namespace, namespace);
    }
670544
public static boolean isClazzExists(String name) {
		try {
			Class.forName(name, false, Decisions.class.getClassLoader());
		} catch (ClassNotFoundException e) {
			return false;
		}
		
		return true;
	}