Class Utils


  • public final class Utils
    extends Object
    • Method Detail

      • emptyEnumeration

        public static <T> Enumeration<T> emptyEnumeration()
      • enumerationFromKeys

        public static <T> Enumeration<T> enumerationFromKeys​(Map<T,​?> map)
      • enumerationFromValues

        public static <T> Enumeration<T> enumerationFromValues​(Map<?,​T> map)
      • getCharsetFromContentType

        public static String getCharsetFromContentType​(String contentType)
        Parse the character encoding from the specified content type header. If the content type is null, or there is no explicit character encoding, null is returned.
        Parameters:
        contentType - a content type header
      • getCookies

        public static Collection<io.netty.handler.codec.http.cookie.Cookie> getCookies​(String name,
                                                                                       io.netty.handler.codec.http.HttpRequest request)
      • getMimeType

        public static String getMimeType​(String fileUrl)
      • sanitizeUri

        public static String sanitizeUri​(String uri)
      • parseAcceptLanguageHeader

        public static Collection<Locale> parseAcceptLanguageHeader​(String acceptLanguageHeader)