/** Convert alternate charset names (eg utf8) to normalized * name (eg UTF-8). * @param s the charset to normalize * @return the normalized charset (or null if normalized version not found) */ public static String normalizeCharset(String s) { String n=CHARSETS.get(s); return (n==null)?s:n; }
/** Convert alternate charset names (eg utf8) to normalized * name (eg UTF-8). * @param s the charset to normalize * @param offset the offset in the charset * @param length the length of the charset in the input param * @return the normalized charset (or null if not found) */ public static String normalizeCharset(String s,int offset,int length) { String n=CHARSETS.get(s,offset,length); return (n==null)?s.substring(offset,offset+length):n; }
/** * Case insensitive fromString() conversion * @param version the String to convert to enum constant * @return the enum constant or null if version unknown */ public static HttpVersion fromString(String version) { return CACHE.get(version); }
/** * Converts the given String parameter to an HttpMethod * @param method the String to get the equivalent HttpMethod from * @return the HttpMethod or null if the parameter method is unknown */ public static HttpMethod fromString(String method) { return CACHE.get(method); } }
/** * Case insensitive fromString() conversion * @param version the String to convert to enum constant * @return the enum constant or null if version unknown */ public static HttpVersion fromString(String version) { return CACHE.get(version); }
/** * Converts the given String parameter to an HttpMethod * @param method the String to get the equivalent HttpMethod from * @return the HttpMethod or null if the parameter method is unknown */ public static HttpMethod fromString(String method) { return CACHE.get(method); } }
/** Convert alternate charset names (eg utf8) to normalized * name (eg UTF-8). */ public static String normalizeCharset(String s) { String n=CHARSETS.get(s); return (n==null)?s:n; }
/** * Converts the given String parameter to an HttpMethod * @param method the String to get the equivalent HttpMethod from * @return the HttpMethod or null if the parameter method is unknown */ public static HttpMethod fromString(String method) { return CACHE.get(method); } }
public static boolean isBlackListProtocol(String tlsProtocol) { Boolean b = __blackProtocols.get(tlsProtocol); return b != null && b; }
public static boolean isBlackListCipher(String tlsCipher) { Boolean b = __blackCiphers.get(tlsCipher); return b != null && b; }
/** * Case insensitive fromString() conversion * @param version the String to convert to enum constant * @return the enum constant or null if version unknown */ public static HttpVersion fromString(String version) { return CACHE.get(version); }
/** * Converts the given String parameter to an HttpMethod * @param method the String to get the equivalent HttpMethod from * @return the HttpMethod or null if the parameter method is unknown */ public static HttpMethod fromString(String method) { return CACHE.get(method); } }
/** * Test if the method type supports <code>x-www-form-urlencoded</code> content * * @param method the method type * @return True of the requests of this method type can be * decoded as <code>x-www-form-urlencoded</code> content to be made available via the * {@link Request#getParameter(String)} and associated APIs */ public boolean isFormEncodedMethod(String method) { return Boolean.TRUE.equals(_formEncodedMethods.get(method)); }
@Override public Type getMimeType() { return _contentType==null?null:MimeTypes.CACHE.get(MimeTypes.getContentTypeWithoutCharset(_contentType)); }
@Override public Type getMimeType() { return _contentType==null?null:MimeTypes.CACHE.get(MimeTypes.getContentTypeWithoutCharset(_contentType)); }
private static String normalizeMimeType(String type) { MimeTypes.Type t =CACHE.get(type); if (t!=null) return t.asString(); return StringUtil.asciiToLowerCase(type); }
private static String normalizeMimeType(String type) { MimeTypes.Type t =CACHE.get(type); if (t!=null) return t.asString(); return StringUtil.asciiToLowerCase(type); }
private static String normalizeMimeType(String type) { MimeTypes.Type t =CACHE.get(type); if (t!=null) return t.asString(); return StringUtil.asciiToLowerCase(type); }
private static String normalizeMimeType(String type) { MimeTypes.Type t =CACHE.get(type); if (t!=null) return t.asString(); return StringUtil.asciiToLowerCase(type); }
private static String normalizeMimeType(String type) { MimeTypes.Type t =CACHE.get(type); if (t!=null) return t.asString(); return StringUtil.asciiToLowerCase(type); }