Class MediaTypeCache

  • public class MediaTypeCache
    extends Object
    Caches the results of parsing content-type headers.
    • Constructor Detail

      • MediaTypeCache

        public MediaTypeCache​(int size)
    • Method Detail

      • parse

        public String[] parse​(String input)
        Looks in the cache and returns the cached value if one is present. If no match exists in the cache, a new parser is created, the input parsed and the results placed in the cache and returned to the user.
        input - The content-type header value to parse
        The results are provided as a two element String array. The first element is the media type less the charset and the second element is the charset