code: public static Buffer consumeMType(final Buffer buffer) throws SipParseException {
          try {
              return consumeToken(buffer);
          } catch (final IndexOutOfBoundsException e) {
              throw new SipParseException(buffer.getReaderIndex(), "Tried to consume m-type but buffer ended abruptly", e);
          } catch (final IOException e) {
              throw new SipParseException(buffer.getReaderIndex(),
                      "Tried to consume m-type but problem reading from underlying stream", e);
          }
      }
docs: Consume a m-type, which according to RFC3261 section 25.1 Basic Rules is:
  
  <pre>
  m-type           =  discrete-type / composite-type
  discrete-type    =  "text" / "image" / "audio" / "video" / "io.sipstack.application.application" / extension-token
  composite-type   =  "message" / "multipart" / extension-token
  extension-token  =  ietf-token / x-token
  ietf-token       =  token
  x-token          =  "x-" token
  </pre>
  
  And if you really read through all of that stuff it all boils down to
  "token" so that is all we end up doing in this method. Hence, this method
  is really only to put some context to consuming a media-type
  
  @return
  @throws IndexOutOfBoundsException
  @throws IOException