/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @exception MessagingException for failures * @see #headers */ public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException for failures */ public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException for failures */ @Override public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @exception MessagingException for failures * @see #headers */ @Override public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @exception MessagingException for failures * @see #headers */ @Override public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException for failures */ @Override public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the value of the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @see #headers */ public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the value of the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @see #headers */ public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the value of the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException */ public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the value of the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException */ public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException for failures */ @Override public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @exception MessagingException for failures * @see #headers */ @Override public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException for failures */ @Override public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * <code>null</code> is returned. <p> * * This implementation uses the <code>getHeader</code> method * to obtain the requisite header field. * * @return disposition of this part, or null if unknown * @exception MessagingException for failures */ @Override public String getDisposition() throws MessagingException { return MimeBodyPart.getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @exception MessagingException for failures * @see #headers */ @Override public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @exception MessagingException for failures * @see #headers */ @Override public String getDisposition() throws MessagingException { return getDisposition(this); }
/** * Returns the disposition from the "Content-Disposition" header field. * This represents the disposition of this part. The disposition * describes how the part should be presented to the user. <p> * * If the Content-Disposition field is unavailable, * null is returned. <p> * * This implementation uses <code>getHeader(name)</code> * to obtain the requisite header field. * * @exception MessagingException for failures * @see #headers */ @Override public String getDisposition() throws MessagingException { return getDisposition(this); }
Multipart multiPart = (Multipart) message.getContent(); for (int i = 0; i < multiPart.getCount(); i++) { MimeBodyPart part = (MimeBodyPart) multiPart.getBodyPart(i); if (Part.ATTACHMENT.equalsIgnoreCase(part.getDisposition())) { // this part is attachment // code to save attachment... } }
if (mimeMessage.getContentType().contains("multipart")) { Multipart multiPart = (Multipart) mimeMessage.getContent(); messageContent = (String)messageContent; messageContent = ""; for (int partCount = 0; partCount < multiPart.getCount(); partCount++) { MimeBodyPart part = (MimeBodyPart) multiPart .getBodyPart(partCount); if (!Part.ATTACHMENT .equalsIgnoreCase(part.getDisposition())) { // this part is the message content content = getText(part,embededImgMap); } } }
if( mimeMessage.getContent() instanceof Multipart) { Multipart multipartContent = (Multipart) mimeMessage.getContent(); List<BodyPart> deleteThese = new ArrayList<BodyPart>(); for( int i = 0; i < multipartContent.getCount(); i++ ) { MimeBodyPart part = (MimeBodyPart) multipartContent.getBodyPart(i); String disposition = part.getDisposition(); if( disposition != null && ( disposition.equalsIgnoreCase( Part.ATTACHMENT ) || ( disposition.equalsIgnoreCase( Part.INLINE ) && !part.isMimeType( PLAIN_TEXT_MIME_TYPE ) && !part.isMimeType( HTML_MIME_TYPE ) ) ) ) { // do something with part } }