@Test public void testGetMimeType() throws Exception { BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder(); builder.addField(new RawField("Content-Type ", "text/PLAIN")); BodyDescriptor bd = builder.build(); Assert.assertEquals("text/plain", bd.getMimeType()); builder.reset(); builder.addField(new RawField("content-type", " TeXt / html ")); bd = builder.build(); Assert.assertEquals("text/html", bd.getMimeType()); builder.reset(); builder.addField(new RawField("CONTENT-TYPE", " x-app/yada ; param = yada")); bd = builder.build(); Assert.assertEquals("x-app/yada", bd.getMimeType()); builder.reset(); builder.addField(new RawField("CONTENT-TYPE", " yada")); bd = builder.build(); Assert.assertEquals("text/plain", bd.getMimeType()); builder.reset(); builder.addField(new RawField("Content-Type ", "text/plain")); bd = builder.build(); Assert.assertEquals("text/plain", bd.getMimeType()); builder.addField(new RawField("Content-Type ", "text/html")); bd = builder.build(); Assert.assertEquals("text/plain", bd.getMimeType()); BodyDescriptorBuilder parent = new DefaultBodyDescriptorBuilder(); parent.addField(new RawField("Content-Type", "mutlipart/alternative; boundary=foo")); BodyDescriptorBuilder child = parent.newChild(); bd = child.build(); Assert.assertEquals("text/plain", bd.getMimeType()); child.addField(new RawField("Content-Type", " child/type")); bd = child.build(); Assert.assertEquals("child/type", bd.getMimeType()); parent.reset(); parent.addField(new RawField("Content-Type", "multipart/digest; boundary=foo")); child = parent.newChild(); bd = child.build(); Assert.assertEquals("message/rfc822", bd.getMimeType()); child.addField(new RawField("Content-Type", " child/type")); bd = child.build(); Assert.assertEquals("child/type", bd.getMimeType()); }
public String getMimeType() { return mimeType; }
MaximalBodyDescriptor implements BodyDescriptor { public String getMimeType() { return mimeType; } }
MaximalBodyDescriptor implements BodyDescriptor { public String getMimeType() { return mimeType; } MaximalBodyDescriptor(
            final String mimeType,
            final String mediaType,
            final String subType,
            final String boundary,
            final String charset,
            final Map<String, ParsedField> fields); }
MaximalBodyDescriptor implements BodyDescriptor { public String getMimeType() { return mimeType; } MaximalBodyDescriptor(
            final String mimeType,
            final String mediaType,
            final String subType,
            final String boundary,
            final String charset,
            final Map<String, ParsedField> fields); String getMimeType(); String getBoundary(); String getCharset(); String getMediaType(); String getSubType(); Map<String, String> getContentTypeParameters(); String getTransferEncoding(); long getContentLength(); int getMimeMajorVersion(); int getMimeMinorVersion(); String getContentDescription(); String getContentId(); String getContentDispositionType(); Map<String, String> getContentDispositionParameters(); String getContentDispositionFilename(); Date getContentDispositionModificationDate(); Date getContentDispositionCreationDate(); Date getContentDispositionReadDate(); long getContentDispositionSize(); List<String> getContentLanguage(); String getContentLocation(); String getContentMD5Raw(); @Override String toString(); }
MaximalBodyDescriptor implements BodyDescriptor { public String getMimeType() { return mimeType; } MaximalBodyDescriptor(
            final String mimeType,
            final String mediaType,
            final String subType,
            final String boundary,
            final String charset,
            final Map<String, ParsedField> fields); String getMimeType(); String getBoundary(); String getCharset(); String getMediaType(); String getSubType(); Map<String, String> getContentTypeParameters(); String getTransferEncoding(); long getContentLength(); int getMimeMajorVersion(); int getMimeMinorVersion(); String getContentDescription(); String getContentId(); String getContentDispositionType(); Map<String, String> getContentDispositionParameters(); String getContentDispositionFilename(); Date getContentDispositionModificationDate(); Date getContentDispositionCreationDate(); Date getContentDispositionReadDate(); long getContentDispositionSize(); List<String> getContentLanguage(); String getContentLocation(); String getContentMD5Raw(); @Override String toString();  }