Does the URL represent a .rar archive
@param url The URL
@return <code>true</code> if .rar archive, otherwise <code>false</code>
970507
protected boolean isRarArchive(URL url)
   {
      if (url == null)
         return false;

      return isRarFile(url) || isRarDirectory(url);
   }
1183817
function (url) {
        if (_.isEmpty(url)) {
            return false;
        }

        // convert url strings to Url
        (typeof url === STRING) && (url = new Url(url));

        // this ensures we don't proceed any further for any protocol
        // that is not https
        if (url.protocol !== HTTPS) {
            return false;
        }

        // test the input url against allowed matches
        return this.matches.test(url);
    }
949750
public static boolean acceptsUrl(String url) {
    return (url != null) && (url.startsWith("jdbc:mariadb:")
        || (url.startsWith("jdbc:mysql:") && !url.contains(DISABLE_MYSQL_URL)));
  }
95357
protected boolean included(String url) {
        for (final Pattern urlPattern : this.includedUrls) {
            final Matcher matcher = urlPattern.matcher(url);
            if (matcher.matches()) {
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("Include pattern " + urlPattern.pattern() + " matches " + url);
                }
                return true;
            }
        }
        
        return false;
    }
714125
static void openURL(URL url) {
    if (Desktop.isDesktopSupported() 
        && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
      try {
        Desktop.getDesktop().browse(url.toURI());
      } catch (Exception ex) {
        Tools.showError(ex);
      }
    } else if(SystemUtils.IS_OS_LINUX) {
      //handle the case where Desktop.browse() is not supported, e.g. kubuntu
      //without libgnome
      try {
        Runtime.getRuntime().exec(new String[] { "xdg-open", url.toString() });
      } catch (Exception ex) {
        Tools.showError(ex);
      }
    }
  }
782382
public static boolean isUrl(String urlAsString) {
        if (urlAsString != null && urlAsString.trim().length() > 0) {
            try {
                new URL(urlAsString);
                return true;
            } catch (MalformedURLException murle) {
                return false;
            }
        }

        return false;
    }
857499
public static boolean isAbsoluteURI( String uri )
    {
         //
         // This method needs to be fast, so it can't use java.net.URI.
         //
         if ( uri.length() == 0 || uri.charAt( 0 ) == '/' ) return false;
        
         for ( int i = 0, len = uri.length(); i < len; ++i )
         {
             char c = uri.charAt( i );
            
             if ( c == ':' )
             {
                 return true;
             }
             else if ( c == '/' )
             {
                 return false;
             }
         }
        
         return false;
     }
408978
def is_relative_url(url):
    
    if url.startswith("#"):
        return None
    if url.find("://") > 0 or url.startswith("//"):
        # either 'http(s)://...' or '//cdn...' and therefore absolute
        return False
    return True
342581
@Override
    public boolean isDirectory() {
        final ArchivePath archivePath = ArchivePaths.create(path.toString());
        Node node = archive.get(archivePath);
        return node.getAsset() == null;
    }
641499
private boolean isValidRecoveryUrl(StringBuilder recoveryUrl) {
        String pageSuffix = adminConfig.getPageSufix();
        return !recoveryUrl.toString().contains(Constants.DEFAULT_INDEX_PAGE.replace("xhtml", pageSuffix)) && !recoveryUrl.toString().contains(Constants.DEFAULT_ACCESS_DENIED_PAGE.replace("xhtml", adminConfig.getPageSufix()))
                && !recoveryUrl.toString().contains(Constants.DEFAULT_EXPIRED_PAGE.replace("xhtml", pageSuffix)) && !recoveryUrl.toString().contains(Constants.DEFAULT_OPTIMISTIC_PAGE.replace("xhtml", adminConfig.getPageSufix()))
                && !recoveryUrl.toString().contains(Constants.DEFAULT_LOGIN_PAGE.replace("xhtml", adminConfig.getPageSufix()));
    }
1216301
def is_year_archive?
      segments = params[:slug].split('/')
      (get_type_by_url == 'AR' && !segments[1].blank? && segments[2].blank? && segments[3].blank?) ? true : false
    end
409692
boolean archiveFile(File logFile) {

		FileOutputStream fOut;
		ZipOutputStream zOut;

		// necessary because of possible IOException
		try {
			fOut = new FileOutputStream(logFile.getPath() + ".zip");
			zOut = new ZipOutputStream(fOut);

			FileInputStream fIn = new FileInputStream(logFile);
			BufferedInputStream bIn = new BufferedInputStream(fIn);

			// new ZipEntry to put into the archive
			ZipEntry entry = new ZipEntry(logFile.getCanonicalFile().getName());
			zOut.putNextEntry(entry);

			// create a byte array
			byte[] barray = new byte[1024];
			// byte count variable
			int bytes;

			// read the BufferedInputStream and write it entirely to the archive
			while ((bytes = bIn.read(barray, 0, 1024)) > -1) {
				zOut.write(barray, 0, bytes);
			}

			// clean up
			zOut.flush();
			zOut.close();
			fOut.close();

			return true;

		} catch (IOException ioE) {
			return false;
		}

	}
1100731
public static boolean isValidUrl(String url) {
        try {
            if (Strings.isNullOrEmpty(url)) {
                return false;
            }
            new URL(url);
            return true;
        } catch (MalformedURLException e) {
            return false;
        }
    }
474010
private boolean isURLAbsolute(String url) {
        for (String protocol : PROTOCOLS) {
            if (url.startsWith(protocol)) {
                return true;
            }
        }

        return false;
    }
557053
public static function isUrlArchive($url)
    {
        if (0 === strpos($url, 'http')) {
            foreach (self::$extensions as $extension) {
                if (substr($url, -\strlen($extension)) === $extension) {
                    return true;
                }
            }
        }

        return false;
    }
443619
public static boolean isInProcessDatabaseType(String url) {

        if (url == S_FILE || url == S_RES || url == S_MEM) {
            return true;
        }

        return false;
    }
627872
public static boolean isRegistered(URL url) {

		if (url == null) {
			throw new IllegalArgumentException("Camera device URL cannot be null");
		}

		try {
			return isRegistered(url.toURI());
		} catch (URISyntaxException e) {
			throw new WebcamException(e);
		}
	}