private boolean isMimeType()

in src/main/java/org/apache/commons/mail/util/MimeMessageParser.java [241:256]


    private boolean isMimeType(final MimePart part, final String mimeType)
        throws MessagingException, IOException
    {
        // Do not use part.isMimeType(String) as it is broken for MimeBodyPart
        // and does not really check the actual content type.

        try
        {
            final ContentType ct = new ContentType(part.getDataHandler().getContentType());
            return ct.match(mimeType);
        }
        catch (final ParseException ex)
        {
            return part.getContentType().equalsIgnoreCase(mimeType);
        }
    }