char consumeCharacter(CharMatcher matcher) {
            checkState(hasMore());
            char c = previewChar();
            checkState(matcher.matches(c));
            position++;
            return c;
        }
Parses a media type from its string representation.

@throws IllegalArgumentException if the input is not parsable
core/src/main/java/com/linecorp/armeria/common/MediaType.java