String consumeToken(CharMatcher matcher) {
            int startPosition = position;
            String token = consumeTokenIfPresent(matcher);
            checkState(position != startPosition);
            return token;
        }
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