/** * Set the "Content-Description" header field for this body part. * If the description parameter is <code>null</code>, then any * existing "Content-Description" fields are removed. <p> * * If the description contains non US-ASCII characters, it will * be encoded using the platform's default charset. If the * description contains only US-ASCII characters, no encoding * is done and it is used as is. <p> * * Note that if the charset encoding process fails, a * MessagingException is thrown, and an UnsupportedEncodingException * is included in the chain of nested exceptions within the * MessagingException. * * @param description content description * @exception IllegalWriteException if the underlying * implementation does not support modification * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. * @exception MessagingException otherwise; an * UnsupportedEncodingException may be included * in the exception chain if the charset * conversion fails. */ public void setDescription(String description) throws MessagingException { setDescription(description, null); }
/** * Set the "Content-Description" header field for this Message. * If the description parameter is <code>null</code>, then any * existing "Content-Description" fields are removed. <p> * * If the description contains non US-ASCII characters, it will * be encoded using the specified charset. If the description * contains only US-ASCII characters, no encoding is done and * it is used as-is. <p> * * Note that if the charset encoding process fails, a * MessagingException is thrown, and an UnsupportedEncodingException * is included in the chain of nested exceptions within the * MessagingException. * * @param description Description * @param charset Charset for encoding * @exception IllegalWriteException if the underlying * implementation does not support modification * @exception IllegalStateException if this message is * obtained from a READ_ONLY folder. * @exception MessagingException An * UnsupportedEncodingException may be included * in the exception chain if the charset * conversion fails. */ public void setDescription(String description, String charset) throws MessagingException { MimeBodyPart.setDescription(this, description, charset); }
/** * Set the "Content-Description" header field for this body part. * If the description parameter is <code>null</code>, then any * existing "Content-Description" fields are removed. <p> * * If the description contains non US-ASCII characters, it will * be encoded using the specified charset. If the description * contains only US-ASCII characters, no encoding is done and * it is used as is. <p> * * Note that if the charset encoding process fails, a * MessagingException is thrown, and an UnsupportedEncodingException * is included in the chain of nested exceptions within the * MessagingException. * * @param description Description * @param charset Charset for encoding * @exception IllegalWriteException if the underlying * implementation does not support modification * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. * @exception MessagingException otherwise; an * UnsupportedEncodingException may be included * in the exception chain if the charset * conversion fails. */ public void setDescription(String description, String charset) throws MessagingException { setDescription(this, description, charset); }
/** * Set the "Content-Description" header field for this body part. * If the description parameter is <code>null</code>, then any * existing "Content-Description" fields are removed. <p> * * If the description contains non US-ASCII characters, it will * be encoded using the platform's default charset. If the * description contains only US-ASCII characters, no encoding * is done and it is used as is. <p> * * Note that if the charset encoding process fails, a * MessagingException is thrown, and an UnsupportedEncodingException * is included in the chain of nested exceptions within the * MessagingException. * * @param description content description * @exception IllegalWriteException if the underlying * implementation does not support modification * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. * @exception MessagingException otherwise; an * UnsupportedEncodingException may be included * in the exception chain if the charset * conversion fails. */ @Override public void setDescription(String description) throws MessagingException { setDescription(description, null); }
/** * Set the "Content-Description" header field for this body part. * If the description parameter is <code>null</code>, then any * existing "Content-Description" fields are removed. <p> * * If the description contains non US-ASCII characters, it will * be encoded using the specified charset. If the description * contains only US-ASCII characters, no encoding is done and * it is used as is. <p> * * Note that if the charset encoding process fails, a * MessagingException is thrown, and an UnsupportedEncodingException * is included in the chain of nested exceptions within the * MessagingException. * * @param description Description * @param charset Charset for encoding * @exception IllegalWriteException if the underlying * implementation does not support modification * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. * @exception MessagingException otherwise; an * UnsupportedEncodingException may be included * in the exception chain if the charset * conversion fails. */ public void setDescription(String description, String charset) throws MessagingException { setDescription(this, description, charset); }
/** * Set the "Content-Description" header field for this Message. * If the description parameter is <code>null</code>, then any * existing "Content-Description" fields are removed. <p> * * If the description contains non US-ASCII characters, it will * be encoded using the specified charset. If the description * contains only US-ASCII characters, no encoding is done and * it is used as-is. <p> * * Note that if the charset encoding process fails, a * MessagingException is thrown, and an UnsupportedEncodingException * is included in the chain of nested exceptions within the * MessagingException. * * @param description Description * @param charset Charset for encoding * @exception IllegalWriteException if the underlying * implementation does not support modification * @exception IllegalStateException if this message is * obtained from a READ_ONLY folder. * @exception MessagingException An * UnsupportedEncodingException may be included * in the exception chain if the charset * conversion fails. */ public void setDescription(String description, String charset) throws MessagingException { MimeBodyPart.setDescription(this, description, charset); }
/** * Factory to create the attachment body part. * @param index the attachment index. * @return a body part with default headers set. * @throws MessagingException if there is a problem. * @throws IndexOutOfBoundsException if the given index is not an valid * attachment index. */ private MimeBodyPart createBodyPart(int index) throws MessagingException { assert Thread.holdsLock(this); final MimeBodyPart part = new MimeBodyPart(); part.setDisposition(Part.ATTACHMENT); part.setDescription(descriptionFrom( attachmentFormatters[index], attachmentFilters[index], attachmentNames[index])); setAcceptLang(part); return part; }
/** * Factory to create the attachment body part. * @param index the attachment index. * @return a body part with default headers set. * @throws MessagingException if there is a problem. * @throws IndexOutOfBoundsException if the given index is not an valid * attachment index. */ private MimeBodyPart createBodyPart(int index) throws MessagingException { assert Thread.holdsLock(this); final MimeBodyPart part = new MimeBodyPart(); part.setDisposition(Part.ATTACHMENT); part.setDescription(descriptionFrom( attachmentFormatters[index], attachmentFilters[index], attachmentNames[index])); setAcceptLang(part); return part; }
/** * Factory to create the in-line body part. * @return a body part with default headers set. * @throws MessagingException if there is a problem. */ private MimeBodyPart createBodyPart() throws MessagingException { assert Thread.holdsLock(this); final MimeBodyPart part = new MimeBodyPart(); part.setDisposition(Part.INLINE); part.setDescription(descriptionFrom(getFormatter(), getFilter(), subjectFormatter)); setAcceptLang(part); return part; }
/** * Factory to create the in-line body part. * @return a body part with default headers set. * @throws MessagingException if there is a problem. */ private MimeBodyPart createBodyPart() throws MessagingException { assert Thread.holdsLock(this); final MimeBodyPart part = new MimeBodyPart(); part.setDisposition(Part.INLINE); part.setDescription(descriptionFrom(getFormatter(), getFilter(), subjectFormatter)); setAcceptLang(part); return part; }
body.setDescription("Formatted using " + (t == null ? Throwable.class.getName() : t.getClass().getName()) + ", filtered with "
body.setDescription("Formatted using " + (t == null ? Throwable.class.getName() : t.getClass().getName()) + ", filtered with "
public void setDescription(String description) throws MessagingException { setDescription(description, null); }
public void setDescription(String description) throws MessagingException { setDescription(description, null); }
body.setDescription(verify); setContent(body, "", bodyContentType); multipart.addBodyPart(body); for (int i = 0; i < ambp.length; ++i) { ambp[i].setDescription(verify); setContent(ambp[i], "", atn[i]);
body.setDescription(verify); setContent(body, "", bodyContentType); multipart.addBodyPart(body); for (int i = 0; i < ambp.length; ++i) { ambp[i].setDescription(verify); setContent(ambp[i], "", atn[i]);
private MimeBodyPart createBodyPart(int index) throws MessagingException { assert Thread.holdsLock(this); final MimeBodyPart part = new MimeBodyPart(); part.setDisposition(Part.ATTACHMENT); part.setDescription(descriptionFrom( attachmentFormatters[index], attachmentFilters[index], attachmentNames[index])); setAcceptLang(part); return part; }
public static void IMAPMimeBodyPart_setDescription(MimeBodyPart mbp, String description) throws MessagingException { if (!Profiler.INSTANCE.isActive()) // only needed for better performance mbp.setDescription(description); else profileInvokeMExcep(mbp, "setDescription", description); }
private MimeBodyPart createBodyPart() throws MessagingException { assert Thread.holdsLock(this); final MimeBodyPart part = new MimeBodyPart(); part.setDisposition(Part.INLINE); part.setDescription(descriptionFrom(getFormatter(), getFilter(), subjectFormatter)); setAcceptLang(part); return part; }
/** * Factory to create the in-line body part. * @return a body part with default headers set. * @throws MessagingException if there is a problem. */ private MimeBodyPart createBodyPart() throws MessagingException { assert Thread.holdsLock(this); final MimeBodyPart part = new MimeBodyPart(); part.setDisposition(Part.INLINE); part.setDescription(descriptionFrom(getFormatter(), getFilter(), subjectFormatter)); setAcceptLang(part); return part; }