javax.mail.internet
クラス PreencodedMimeBodyPart

java.lang.Object
  上位を拡張 javax.mail.BodyPart
      上位を拡張 javax.mail.internet.MimeBodyPart
          上位を拡張 javax.mail.internet.PreencodedMimeBodyPart
すべての実装されたインタフェース:
MimePart, Part

public final class PreencodedMimeBodyPart
extends MimeBodyPart

A MimeBodyPart that handles data that has already been encoded. This class is useful when constructing a message and attaching data that has already been encoded (for example, using base64 encoding). The data may have been encoded by the application, or may have been stored in a file or database in encoded form. The encoding is supplied when this object is created. The data is attached to this object in the usual fashion, by using the setText, setContent, or setDataHandler methods.

導入されたバージョン:
JavaMail 1.4

フィールドの概要
 
クラス javax.mail.internet.MimeBodyPart から継承されたフィールド
content, contentStream, dh, headers
 
クラス javax.mail.BodyPart から継承されたフィールド
parent
 
インタフェース javax.mail.Part から継承されたフィールド
ATTACHMENT, INLINE
 
コンストラクタの概要
PreencodedMimeBodyPart(String encoding)
          Create a PreencodedMimeBodyPart that assumes the data is encoded using the specified encoding.
 
メソッドの概要
 String getEncoding()
          Returns the content transfer encoding specified when this object was created.
protected  void updateHeaders()
          Force the Content-Transfer-Encoding header to use the encoding that was specified when this object was created.
 void writeTo(OutputStream os)
          Output the body part as an RFC 822 format stream.
 
クラス javax.mail.internet.MimeBodyPart から継承されたメソッド
addHeader, addHeaderLine, attachFile, attachFile, getAllHeaderLines, getAllHeaders, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getFileName, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getSize, isMimeType, removeHeader, saveFile, saveFile, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setHeader, setText, setText, setText
 
クラス javax.mail.BodyPart から継承されたメソッド
getParent
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PreencodedMimeBodyPart

public PreencodedMimeBodyPart(String encoding)
Create a PreencodedMimeBodyPart that assumes the data is encoded using the specified encoding. The encoding must be a MIME supported Content-Transfer-Encoding.

メソッドの詳細

getEncoding

public String getEncoding()
                   throws MessagingException
Returns the content transfer encoding specified when this object was created.

定義:
インタフェース MimePart 内の getEncoding
オーバーライド:
クラス MimeBodyPart 内の getEncoding
戻り値:
内容転送エンコーディング
例外:
MessagingException
関連項目:
MimeBodyPart.headers

writeTo

public void writeTo(OutputStream os)
             throws IOException,
                    MessagingException
Output the body part as an RFC 822 format stream.

定義:
インタフェース Part 内の writeTo
オーバーライド:
クラス MimeBodyPart 内の writeTo
例外:
IOException - ストリームへの書き込み中にエラーが発生する場合、 又は javax.activation レイヤによりエラーが生成される場合
MessagingException - 書き込まれるデータを取り出す時にエラーが発生した場合
関連項目:
DataHandler

updateHeaders

protected void updateHeaders()
                      throws MessagingException
Force the Content-Transfer-Encoding header to use the encoding that was specified when this object was created.

オーバーライド:
クラス MimeBodyPart 内の updateHeaders
例外:
MessagingException