public ContentType(String type) throws ParseException { final int slash = type.indexOf("/"); final int semi = type.indexOf(";"); try { _major = type.substring(0, slash); if (semi == -1) { _minor = type.substring(slash + 1); } else { _minor = type.substring(slash + 1, semi); _list = new ParameterList(type.substring(semi + 1)); } } catch (StringIndexOutOfBoundsException e) { throw new ParseException("Type invalid: " + type); }
public ContentType() {
    public ContentType(String type) throws ParseException {        final int slash = type.indexOf("/");        final int semi = type.indexOf(";");        try {            _major = type.substring(0, slash);            if (semi == -1) {                _minor = type.substring(slash + 1);            } else {                _minor = type.substring(slash + 1, semi);                _list = new ParameterList(type.substring(semi + 1));            }        } catch (StringIndexOutOfBoundsException e) {            throw new ParseException("Type invalid: " + type);        }    }