String consumeTokenIfPresent(CharMatcher matcher) {
            checkState(hasMore());
            int startPosition = position;
            position = matcher.negate().indexIn(input, startPosition);
            return hasMore() ? input.substring(startPosition, position) : input.substring(startPosition);
        }
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