Decodes data encoded with MIME base64

@param value The data to decode
@return decoded data
778462
public static String base64Decode(final String value) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        return new String(Base64.getDecoder().decode(value), StandardCharsets.UTF_8);
    }
1317452
public static function decodeForMaria($value)
    {
        return is_string($value) && strpos($value, self::DATA_URI_PREFIX) === 0
            ? file_get_contents($value)
            : $value;
    }
17252
public static final String base64Decode(String str) {
        if (str == null) {
            return null;
        } else {
            byte data[] = getBytes(str);
            return toString(base64Decode(data));
        }
    }
1199235
def decode(cls, value):
        
        try:
            data = [v for v in value.decode(cls._encoding).split(',') if
                    v != '']
            return data if data else None
        except AttributeError:
            return value
160385
function decode ( value ) {
	let resolvedValue = {};
	try {
		resolvedValue = JSON.parse(value.getValue());
	} catch ( e ) {
		resolvedValue = null;
	}
	return setJsonValueToSassValue(resolvedValue);
}
448965
private function deserialize($value)
    {
        $decoded = base64_decode($value, true);
        if ($decoded === false) {
            return false;
        }

        $decompressed = gzuncompress($decoded);
        return $decompressed;
    }
795729
public static String urlDecode(final String value) {
        if (value == null) {
            return null;
        }

        try {
            return URLDecoder.decode(value, DEFAULT_ENCODING);

        } catch (UnsupportedEncodingException ex) {
            throw new RuntimeException(ex);
        }
    }
690531
public static byte[] messageDigest(String value) {
        MessageDigest md5;
        try {
            md5 = MessageDigest.getInstance("MD5");
            md5.update(value.getBytes("UTF-8"));
            return md5.digest();
        } catch (NoSuchAlgorithmException e) {
            throw new SofaRpcRuntimeException("No such algorithm named md5", e);
        } catch (UnsupportedEncodingException e) {
            throw new SofaRpcRuntimeException("Unsupported encoding of" + value, e);
        }
    }
391622
public static MimeType getMimeType(String value) {
        if (StringUtils.isNotBlank(value)) {
            try {
                return getMimeTypes().forName(value);
            } catch (MimeTypeException e) {
                MediaType mediaType = getMediaType(null, value);
                if (mediaType != null) {
                    try {
                        return getMimeTypes().forName(mediaType.toString());
                    } catch (MimeTypeException e1) {
                        // detection not successful
                    }
                }
            }
        }
        return null;
    }
644995
@Override
    public String hexMD5(String value) {
        return String.valueOf(Hex.encodeHex(md5(value)));
    }
1114722
public final <T> T decode(Val value) {
      if (value == null) {
         return null;
      }
      return decode(value.get());
   }
1031088
public static String encode(String value) {
        if (value == null) {
            return value;
        }
        try {
            value = URLEncoder.encode(value, Constants.UTF_8);
        } catch (UnsupportedEncodingException e) {
            // Do nothing - UTF-8 should always be supported
        }
        return value;
    }
891888
public static byte[] decodeBase64(String encodedData) {
		BufferedReader reader = new BufferedReader(new StringReader(encodedData));
		int length = encodedData.length();
		byte[] retval = new byte[length];
		int actualLength = 0;

		String line;
		try {
			while ((line = reader.readLine()) != null) {
				byte[] rawData = line.getBytes();


				int n = 0;
				for (int i = 0; i < rawData.length; i += 4) {
					n = (base64Chars.indexOf(rawData[i]) << 18) |
							(base64Chars.indexOf(rawData[i + 1]) << 12);

					retval[actualLength++] = (byte) ((n >>> 16) & 255);

					if (rawData[i + 2] != '=') {
						n |= (base64Chars.indexOf(rawData[i + 2]) << 6);
						retval[actualLength++] = (byte) ((n >>> 8) & 255);
					}
					if (rawData[i + 3] != '=') {
						n |= (base64Chars.indexOf(rawData[i + 3]));
						retval[actualLength++] = (byte) (n & 255);
					}
				}
			}
		}
		catch (IOException ioe) {
			throw new IllegalStateException("exception while reading input with message: " + ioe);
		}
		if (actualLength != length) {
			byte[] actualRetval = new byte[actualLength];
			System.arraycopy(retval, 0, actualRetval, 0, actualLength);
			return actualRetval;
		}
		return retval;
	}
202269
public static byte[] decodeByteArray(String value) throws ParseException {
		try {
			return Base64.decodeBase64(value.getBytes(UTF8_ENCODING));
		} catch(UnsupportedEncodingException e) {
			throw new MappingException("Could not decode byteArray to UTF8 encoding", e);
		}

	}
925939
private ContentType parseContentType(String value) {
        String[] pcs = value.split("\\;");
        String mimeType = pcs[0].trim();
        String charSet = "UTF-8";
        
        for (int i = 1; i < pcs.length; i++) {
            String s = pcs[i].trim().toUpperCase();
            
            if (s.startsWith("CHARSET=")) {
                charSet = s.substring(8);
                break;
            }
        }
        
        return ContentType.create(mimeType, charSet);
    }
984474
public static String filterEncode(String value) {

        if (value == null)
            return null;

        // make buffer roomy
        StringBuilder encodedValue = new StringBuilder(value.length() * 2);

        int length = value.length();

        for (int i = 0; i < length; i++) {

            char c = value.charAt(i);

            if (c < FILTER_ESCAPE_TABLE.length) {
                encodedValue.append(FILTER_ESCAPE_TABLE[c]);
            } else {
                // default: add the char
                encodedValue.append(c);
            }
        }

        return encodedValue.toString();
    }
1144113
public static String oauthDecode(String value) throws DecoderException {
    if (value == null) {
      return "";
    }

    try {
      return new String(URLCodec.decodeUrl(value.getBytes("US-ASCII")), "UTF-8");
    }
    catch (UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
  }