Java Utililty Methods Hash String

List of utility methods to do Hash String

Description

The list of methods to do Hash String are organized into topic(s).

Method

booleanhasHtmlTag(String content)
has Html Tag
if (content != null) {
    if (!content.contains("<")) 
        return false;
    for (String tag : tags) {
        if (content.contains(tag))
            return true;
return false;
booleanhasHTMLTag(String html)
has HTML Tag
boolean flag = false;
if (html != null && html.length() > 0) {
    for (int i = 0; i <= html.length() - 1; ++i) {
        char c = html.charAt(i);
        switch (c) {
        case '\"':
            flag = true;
            break;
...
booleanhasHTMLTag(String text)
Returns true if the input string contains any escape character The escaped characters are : < > " ' \ &
if (text.indexOf('<') >= 0) {
    return true;
if (text.indexOf('>') >= 0) {
    return true;
if (text.indexOf('\"') >= 0) {
    return true;
...
StringhashToHexString(byte[] hash)
hash To Hex String
final StringBuilder hexString = new StringBuilder();
for (byte mdbyte : hash) {
    hexString.append(Integer.toHexString(0xFF & mdbyte));
return hexString.toString();
StringhashToString(byte hash[])
hash To String
StringBuilder sb = new StringBuilder();
for (byte b : hash) {
    int nibble1 = (b & 0xF0) >> 4;
    int nibble2 = b & 0x0F;
    sb.append(Integer.toHexString(nibble1));
    sb.append(Integer.toHexString(nibble2));
return sb.toString();
...
booleanhasHttp(String url)
has Http
return url.startsWith("http://") || url.startsWith("https://");