com.sun.mail.imap
クラス IMAPMessage

java.lang.Object
  上位を拡張 javax.mail.Message
      上位を拡張 javax.mail.internet.MimeMessage
          上位を拡張 com.sun.mail.imap.IMAPMessage
すべての実装されたインタフェース:
MimePart, Part
直系の既知のサブクラス:
IMAPNestedMessage

public class IMAPMessage
extends MimeMessage

このクラスはIMAPMessageオブジェクトを実装します。

An IMAPMessage object starts out as a light-weight object. It gets filled-in incrementally when a request is made for some item. Or when a prefetch is done using the FetchProfile.

An IMAPMessage has a messageNumber and a sequenceNumber. The messageNumber is its index into its containing folder's messageCache. The sequenceNumber is its IMAP sequence-number.


入れ子のクラスの概要
 
クラス javax.mail.internet.MimeMessage から継承された入れ子のクラス/インタフェース
MimeMessage.RecipientType
 
フィールドの概要
protected  com.sun.mail.imap.protocol.BODYSTRUCTURE bs
           
protected  com.sun.mail.imap.protocol.ENVELOPE envelope
           
protected  String sectionId
           
 
クラス javax.mail.internet.MimeMessage から継承されたフィールド
content, contentStream, dh, flags, headers, modified, saved
 
クラス javax.mail.Message から継承されたフィールド
expunged, folder, msgnum, session
 
インタフェース javax.mail.Part から継承されたフィールド
ATTACHMENT, INLINE
 
コンストラクタの概要
protected IMAPMessage(IMAPFolder folder, int msgnum, int seqnum)
          コンストラクタです。
protected IMAPMessage(Session session)
          IMAPNestedMessage で使用されるコンストラクタです。
 
メソッドの概要
 void addFrom(Address[] addresses)
          指定されたアドレスを既存の "From" フィールドに追加します。
 void addHeader(String name, String value)
          この値をこの header_name の既存値に追加します。
 void addHeaderLine(String line)
          生 RFC 822 ヘッダ行を追加します。
 void addRecipients(Message.RecipientType type, Address[] addresses)
          指定されたアドレスを指定された受信者タイプに追加します。
protected  void checkExpunged()
           
protected  void forceCheckExpunged()
          Do a NOOP to force any untagged EXPUNGE responses and then check if this message is expunged.
 Enumeration getAllHeaderLines()
          Get all header-lines.
 Enumeration getAllHeaders()
          全てのヘッダを取得します。
 String getContentID()
          Content-ID を取得します。
 String[] getContentLangauge()
           
 String getContentMD5()
          Content-MD5 を取得します。
protected  InputStream getContentStream()
          Get all the bytes for this message.
 String getContentType()
          Content-Type を取得します。
 DataHandler getDataHandler()
          このメッセージの DataHandler オブジェクトを取得します。
 String getDescription()
          デコードされた Content-Description を取得します。
 String getDisposition()
          Content-Disposition を取得します。
 String getEncoding()
          Content-Transfer-Encoding を取得します。
protected  int getFetchBlockSize()
           
 String getFileName()
          "filename" ディスポジション パラメータを取得します。
 Flags getFlags()
          このメッセージの Flags を取得します。
 Address[] getFrom()
          "From" 属性を取得します。
 String[] getHeader(String name)
          指定された名前のヘッダを取得します。
 String getHeader(String name, String delimiter)
          指定された名前のヘッダを取得します。
 String getInReplyTo()
           
 int getLineCount()
          Get the total number of lines.
 Enumeration getMatchingHeaderLines(String[] names)
          Get all matching header-lines.
 Enumeration getMatchingHeaders(String[] names)
          一致するヘッダを取得します。
protected  Object getMessageCacheLock()
          Get the messageCacheLock, associated with this Message's Folder.
 String getMessageID()
          Message-ID を取得します。
 Enumeration getNonMatchingHeaderLines(String[] names)
          Get all non-matching headerlines.
 Enumeration getNonMatchingHeaders(String[] names)
          一致しないヘッダを取得します。
 boolean getPeek()
           
protected  com.sun.mail.imap.protocol.IMAPProtocol getProtocol()
          このメッセージのフォルダのプロトコル接続を取得します。
 Date getReceivedDate()
          受信日時 (INTERNALDATE) を取得します。
 Address[] getRecipients(Message.RecipientType type)
          Get the desired Recipient type.
 Address[] getReplyTo()
          ReplyTo アドレスを取得します。
 Address getSender()
          Returns the value of the RFC 822 "Sender" header field.
 Date getSentDate()
          送信日時を取得します。
protected  int getSequenceNumber()
          Get this message's IMAP sequence number.
 int getSize()
          メッセージサイズを取得します。
 String getSubject()
          デコードされた件名を取得します。
protected  long getUID()
           
 void invalidateHeaders()
           
 boolean isSet(Flags.Flag flag)
          Test if the given Flags are set in this message.
 void removeHeader(String name)
          この名前を持つ全てのヘッダを削除します。
 void setContentID(String cid)
          このメッセージの "Content-ID" ヘッダフィールドを設定します。
 void setContentLanguage(String[] as)
          この MimePart の "Content-Language" ヘッダを設定します。
 void setContentMD5(String md5)
          このメッセージの "Content-MD5" ヘッダフィールドを設定します。
 void setDataHandler(DataHandler content)
          このメソッドはこのパートの内容を設定するための仕組みを提供します。
 void setDescription(String description, String charset)
          このメッセージの "Content-Description" ヘッダフィールドを設定します。
 void setDisposition(String disposition)
          このメッセージの "Content-Disposition" ヘッダフィールドを設定します。
protected  void setExpunged(boolean set)
          この Message の消去済みフラグを設定します。
 void setFileName(String filename)
          可能であれば、この部分に関連付けられたファイル名を設定します。
 void setFlags(Flags flag, boolean set)
          Set/Unset the given flags in this message.
 void setFrom(Address address)
          RFC 822 "From" ヘッダフィールドを設定します。
 void setHeader(String name, String value)
          この header_name の値を設定します。
protected  void setMessageNumber(int msgnum)
          Wrapper around the protected method Message.setMessageNumber() to make that method accessible to IMAPFolder.
 void setPeek(boolean flag)
           
 void setRecipients(Message.RecipientType type, Address[] addresses)
          指定された受信者のタイプを指定されたアドレスに設定します。
 void setReplyTo(Address[] addresses)
          RFC 822 "Reply-To" ヘッダフィールドを設定します。
 void setSender(Address address)
          Set the RFC 822 "Sender" header field.
 void setSentDate(Date d)
          RFC 822 "Date" ヘッダフィールドを設定します。
protected  void setSequenceNumber(int seqnum)
          Set this message's IMAP sequence number.
 void setSubject(String subject, String charset)
          "Subject" ヘッダフィールドを設定します。
protected  void setUID(long uid)
           
 void writeTo(OutputStream os)
          Write out the bytes into the given outputstream.
 
クラス javax.mail.internet.MimeMessage から継承されたメソッド
addRecipients, createInternetHeaders, getAllRecipients, getContent, getContentLanguage, getInputStream, getRawInputStream, isMimeType, parse, reply, saveChanges, setContent, setContent, setDescription, setFrom, setRecipients, setSubject, setText, setText, updateHeaders, writeTo
 
クラス javax.mail.Message から継承されたメソッド
addRecipient, getFolder, getMessageNumber, isExpunged, match, setFlag, setRecipient
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

bs

protected com.sun.mail.imap.protocol.BODYSTRUCTURE bs

envelope

protected com.sun.mail.imap.protocol.ENVELOPE envelope

sectionId

protected String sectionId
コンストラクタの詳細

IMAPMessage

protected IMAPMessage(IMAPFolder folder,
                      int msgnum,
                      int seqnum)
コンストラクタです。


IMAPMessage

protected IMAPMessage(Session session)
IMAPNestedMessage で使用されるコンストラクタです。

メソッドの詳細

getProtocol

protected com.sun.mail.imap.protocol.IMAPProtocol getProtocol()
                                                       throws FolderClosedException
このメッセージのフォルダのプロトコル接続を取得します。 もしプロトコルが接続されていない場合は、FolderClosedException がスローされます。 ASSERT: Must hold the messageCacheLock.

例外:
FolderClosedException

getMessageCacheLock

protected Object getMessageCacheLock()
Get the messageCacheLock, associated with this Message's Folder.


getSequenceNumber

protected int getSequenceNumber()
Get this message's IMAP sequence number. ASSERT: This method must be called only when holding the messageCacheLock.


setSequenceNumber

protected final void setSequenceNumber(int seqnum)
Set this message's IMAP sequence number. ASSERT: This method must be called only when holding the messageCacheLock.


setMessageNumber

protected final void setMessageNumber(int msgnum)
Wrapper around the protected method Message.setMessageNumber() to make that method accessible to IMAPFolder.

オーバーライド:
クラス Message 内の setMessageNumber

getUID

protected final long getUID()

setUID

protected final void setUID(long uid)

setExpunged

protected final void setExpunged(boolean set)
クラス Message の記述:
この Message の消去済みフラグを設定します。 このメソッドは実装クラスによってのみ使用されます。

オーバーライド:
クラス Message 内の setExpunged
パラメータ:
set - 消去済みフラグ

checkExpunged

protected void checkExpunged()
                      throws MessageRemovedException
例外:
MessageRemovedException

forceCheckExpunged

protected final void forceCheckExpunged()
                                 throws MessageRemovedException,
                                        FolderClosedException
Do a NOOP to force any untagged EXPUNGE responses and then check if this message is expunged.

例外:
MessageRemovedException
FolderClosedException

getFetchBlockSize

protected int getFetchBlockSize()

getFrom

public final Address[] getFrom()
                        throws MessagingException
"From" 属性を取得します。

オーバーライド:
クラス MimeMessage 内の getFrom
戻り値:
Address オブジェクト
例外:
MessagingException
関連項目:
MimeMessage.headers

setFrom

public final void setFrom(Address address)
                   throws MessagingException
クラス MimeMessage の記述:
RFC 822 "From" ヘッダフィールドを設定します。 全ての既存の値は指定されたアドレスで置き換えられます。 address が null の場合は、このヘッダが削除されます。

オーバーライド:
クラス MimeMessage 内の setFrom
パラメータ:
address - このメッセージの送信者
例外:
MessagingException
IllegalWriteException - 実装が既存値の変更をサポートしない場合

addFrom

public final void addFrom(Address[] addresses)
                   throws MessagingException
クラス MimeMessage の記述:
指定されたアドレスを既存の "From" フィールドに追加します。 "From" フィールドが存在しない場合は作成されます。

オーバーライド:
クラス MimeMessage 内の addFrom
パラメータ:
addresses - このメッセージの送信者
例外:
IllegalWriteException - 実装が既存値の変更をサポートしない場合
MessagingException

getSender

public Address getSender()
                  throws MessagingException
クラス MimeMessage の記述:
Returns the value of the RFC 822 "Sender" header field. If the "Sender" header field is absent, null is returned.

This implementation uses the getHeader method to obtain the requisite header field.

オーバーライド:
クラス MimeMessage 内の getSender
戻り値:
Address object
例外:
MessagingException
関連項目:
MimeMessage.headers

setSender

public void setSender(Address address)
               throws MessagingException
クラス MimeMessage の記述:
Set the RFC 822 "Sender" header field. Any existing values are replaced with the given address. If address is null, this header is removed.

オーバーライド:
クラス MimeMessage 内の setSender
パラメータ:
address - the sender of this message
例外:
MessagingException

getRecipients

public final Address[] getRecipients(Message.RecipientType type)
                              throws MessagingException
Get the desired Recipient type.

オーバーライド:
クラス MimeMessage 内の getRecipients
パラメータ:
type - 受信者の型
戻り値:
Address オブジェクトの配列
例外:
MessagingException - ヘッダが取得できない場合
AddressException - ヘッダの形式に誤りがある場合
関連項目:
MimeMessage.headers, Message.RecipientType.TO, Message.RecipientType.CC, Message.RecipientType.BCC, MimeMessage.RecipientType.NEWSGROUPS

setRecipients

public final void setRecipients(Message.RecipientType type,
                                Address[] addresses)
                         throws MessagingException
クラス MimeMessage の記述:
指定された受信者のタイプを指定されたアドレスに設定します。 アドレスパラメータが null の場合は、対応する受信者フィールドが削除されます。

オーバーライド:
クラス MimeMessage 内の setRecipients
パラメータ:
type - 受信者タイプ
addresses - アドレス
例外:
MessagingException
IllegalWriteException - 実装が既存値の変更をサポートしない場合
関連項目:
MimeMessage.getRecipients(javax.mail.Message.RecipientType)

addRecipients

public final void addRecipients(Message.RecipientType type,
                                Address[] addresses)
                         throws MessagingException
クラス MimeMessage の記述:
指定されたアドレスを指定された受信者タイプに追加します。

オーバーライド:
クラス MimeMessage 内の addRecipients
パラメータ:
type - 受信者タイプ
addresses - アドレス
例外:
MessagingException
IllegalWriteException - 実装が既存値の変更をサポートしない場合

getReplyTo

public final Address[] getReplyTo()
                           throws MessagingException
ReplyTo アドレスを取得します。

オーバーライド:
クラス MimeMessage 内の getReplyTo
戻り値:
返信の送信先のアドレス
例外:
MessagingException
関連項目:
MimeMessage.headers

setReplyTo

public final void setReplyTo(Address[] addresses)
                      throws MessagingException
クラス MimeMessage の記述:
RFC 822 "Reply-To" ヘッダフィールドを設定します。 addresses パラメータが null の場合は、このヘッダが削除されます。

オーバーライド:
クラス MimeMessage 内の setReplyTo
パラメータ:
addresses - 返信の送信先のアドレス
例外:
MessagingException
IllegalWriteException - 実装が既存値の変更をサポートしない場合
MethodNotSupportedException - 実装がこの属性の設定をサポートしない場合

getSubject

public final String getSubject()
                        throws MessagingException
デコードされた件名を取得します。

オーバーライド:
クラス MimeMessage 内の getSubject
戻り値:
件名
例外:
MessagingException
関連項目:
MimeMessage.headers

setSubject

public final void setSubject(String subject,
                             String charset)
                      throws MessagingException
クラス MimeMessage の記述:
"Subject" ヘッダフィールドを設定します。 件名に US-ASCII 以外の文字が含まれる場合は、 指定された文字セットを使用してエンコードされます。 件名に US-ASCII 文字セットだけが含まれる場合は、 エンコーディングが行われず、そのまま使用されます。 件名が null の場合は、既存の "Subject" フィールドが削除されます。

文字セットエンコーディング処理が失敗する場合、MessagingException がスローされ、 UnsupportedEncodingException が MessagingException 内の入れ子にされた例外のチェーンに含まれることに注意して下さい。

オーバーライド:
クラス MimeMessage 内の setSubject
パラメータ:
subject - 件名
charset - 文字セット
例外:
MessagingException - 文字セット変換が失敗すると、UnsupportedEncodingException が例外チェーンに含まれる場合があります

getSentDate

public final Date getSentDate()
                       throws MessagingException
送信日時を取得します。

オーバーライド:
クラス MimeMessage 内の getSentDate
戻り値:
送信日時
例外:
MessagingException

setSentDate

public final void setSentDate(Date d)
                       throws MessagingException
クラス MimeMessage の記述:
RFC 822 "Date" ヘッダフィールドを設定します。 これはメッセージの作成者がメッセージの完成と配信準備完了を示す日付です。 この日付パラメータが null の場合は既存の "Date" フィールドが削除されます。

オーバーライド:
クラス MimeMessage 内の setSentDate
パラメータ:
d - このメッセージの送信日付
例外:
MessagingException
IllegalWriteException - 実装が既存値の変更をサポートしない場合

getReceivedDate

public final Date getReceivedDate()
                           throws MessagingException
受信日時 (INTERNALDATE) を取得します。

オーバーライド:
クラス MimeMessage 内の getReceivedDate
戻り値:
このメッセージが受信された日時
例外:
MessagingException

getSize

public int getSize()
            throws MessagingException
メッセージサイズを取得します。

Note that this returns RFC822.SIZE. That is, it's the size of the whole message, header and body included.

定義:
インタフェース Part 内の getSize
オーバーライド:
クラス MimeMessage 内の getSize
戻り値:
内容バイトのサイズ
例外:
MessagingException

getLineCount

public final int getLineCount()
                       throws MessagingException
Get the total number of lines.

Returns the "body_fld_lines" field from the BODYSTRUCTURE. Note that this field is available only for text/plain and message/rfc822 types

定義:
インタフェース Part 内の getLineCount
オーバーライド:
クラス MimeMessage 内の getLineCount
戻り値:
コンテンツ内の行数
例外:
MessagingException

getContentLangauge

public String[] getContentLangauge()
                            throws MessagingException
例外:
MessagingException

setContentLanguage

public void setContentLanguage(String[] as)
                        throws MessagingException
クラス MimeMessage の記述:
この MimePart の "Content-Language" ヘッダを設定します。 Content-Language ヘッダは RFC 1766 により定義されます。

定義:
インタフェース MimePart 内の setContentLanguage
オーバーライド:
クラス MimeMessage 内の setContentLanguage
パラメータ:
as - 言語タグの配列
例外:
MessagingException

getInReplyTo

public String getInReplyTo()
                    throws MessagingException
例外:
MessagingException

getContentType

public final String getContentType()
                            throws MessagingException
Content-Type を取得します。 Generate this header from the BODYSTRUCTURE. Append parameters as well.

定義:
インタフェース Part 内の getContentType
オーバーライド:
クラス MimeMessage 内の getContentType
戻り値:
この部分のコンテンツ形式
例外:
MessagingException
関連項目:
javax.activation.DataHandler

getDisposition

public final String getDisposition()
                            throws MessagingException
Content-Disposition を取得します。

定義:
インタフェース Part 内の getDisposition
オーバーライド:
クラス MimeMessage 内の getDisposition
戻り値:
このパートのディスポジション、不明の場合は null
例外:
MessagingException
関連項目:
Part.ATTACHMENT, Part.INLINE, Part.getFileName()

setDisposition

public void setDisposition(String disposition)
                    throws MessagingException
クラス MimeMessage の記述:
このメッセージの "Content-Disposition" ヘッダフィールドを設定します。 disposition が null の場合は、 既存の全ての "Content-Disposition" ヘッダフィールドが削除されます。

定義:
インタフェース Part 内の setDisposition
オーバーライド:
クラス MimeMessage 内の setDisposition
パラメータ:
disposition - この Part の処置
例外:
MessagingException
IllegalWriteException - 実装がこのヘッダの変更をサポートしない場合
関連項目:
Part.ATTACHMENT, Part.INLINE, Part.setFileName(java.lang.String)

getEncoding

public final String getEncoding()
                         throws MessagingException
Content-Transfer-Encoding を取得します。

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

getContentID

public final String getContentID()
                          throws MessagingException
Content-ID を取得します。

定義:
インタフェース MimePart 内の getContentID
オーバーライド:
クラス MimeMessage 内の getContentID
戻り値:
コンテンツ ID
例外:
MessagingException

setContentID

public final void setContentID(String cid)
                        throws MessagingException
クラス MimeMessage の記述:
このメッセージの "Content-ID" ヘッダフィールドを設定します。 cid パラメータが null の場合は、 既存の全ての "Content-ID" が削除されます。

オーバーライド:
クラス MimeMessage 内の setContentID
例外:
MessagingException

getContentMD5

public final String getContentMD5()
                           throws MessagingException
Content-MD5 を取得します。

定義:
インタフェース MimePart 内の getContentMD5
オーバーライド:
クラス MimeMessage 内の getContentMD5
戻り値:
コンテンツ MD5
例外:
MessagingException

setContentMD5

public final void setContentMD5(String md5)
                         throws MessagingException
クラス MimeMessage の記述:
このメッセージの "Content-MD5" ヘッダフィールドを設定します。

定義:
インタフェース MimePart 内の setContentMD5
オーバーライド:
クラス MimeMessage 内の setContentMD5
パラメータ:
md5 - コンテンツ ID
例外:
MessagingException

getDescription

public final String getDescription()
                            throws MessagingException
デコードされた Content-Description を取得します。

定義:
インタフェース Part 内の getDescription
オーバーライド:
クラス MimeMessage 内の getDescription
戻り値:
content-description
例外:
MessagingException

setDescription

public final void setDescription(String description,
                                 String charset)
                          throws MessagingException
クラス MimeMessage の記述:
このメッセージの "Content-Description" ヘッダフィールドを設定します。 description パラメータが null の場合は、 既存の全ての "Content-Description" フィールドが削除されます。

description に US-ASCII 以外の文字が含まれる場合は、 指定された文字セットを使用してエンコードされます。 description に US-ASCII 文字だけが含まれる場合は、 エンコーディングは行われず、そのまま使用されます。

文字セットエンコーディング処理が失敗する場合、 MessagingException がスローされ、 UnsupportedEncodingException が MessagingException 内の入れ子にされた例外のチェーンに含まれることに注意して下さい。

オーバーライド:
クラス MimeMessage 内の setDescription
パラメータ:
description - Description
charset - キャラクタエンコーディング
例外:
MessagingException - 文字セット変換が失敗すると、UnsupportedEncodingException が例外チェーンに含まれる場合があります

getMessageID

public final String getMessageID()
                          throws MessagingException
Message-ID を取得します。

オーバーライド:
クラス MimeMessage 内の getMessageID
戻り値:
Message-ID ヘッダの値
例外:
MessagingException - このフィールドの取得により例外が発生する場合
関連項目:
MessageIDTerm

getFileName

public final String getFileName()
                         throws MessagingException
"filename" ディスポジション パラメータを取得します。(IMAP4rev1 でのみ利用可能) If thats not available, get the "name" ContentType parameter.

定義:
インタフェース Part 内の getFileName
オーバーライド:
クラス MimeMessage 内の getFileName
戻り値:
ファイル名
例外:
MessagingException - このフィールドの取得により例外が発生する場合

setFileName

public final void setFileName(String filename)
                       throws MessagingException
クラス MimeMessage の記述:
可能であれば、この部分に関連付けられたファイル名を設定します。

このメッセージの "Content-Disposition" ヘッダフィールドにおける "filename" パラメータを設定します。

定義:
インタフェース Part 内の setFileName
オーバーライド:
クラス MimeMessage 内の setFileName
パラメータ:
filename - この Part に関連付けるファイル名
例外:
IllegalWriteException - 実装がこのヘッダの変更をサポートしない場合
MessagingException

getContentStream

protected final InputStream getContentStream()
                                      throws MessagingException
Get all the bytes for this message. Overrides getContentStream() in MimeMessage. This method is ultimately used by the DataHandler to obtain the input stream for this message.

オーバーライド:
クラス MimeMessage 内の getContentStream
例外:
MessagingException
関連項目:
MimeMessage.getContentStream()

getDataHandler

public DataHandler getDataHandler()
                           throws MessagingException
このメッセージの DataHandler オブジェクトを取得します。

定義:
インタフェース Part 内の getDataHandler
オーバーライド:
クラス MimeMessage 内の getDataHandler
戻り値:
コンテンツの DataHandler
例外:
MessagingException

setDataHandler

public final void setDataHandler(DataHandler content)
                          throws MessagingException
クラス MimeMessage の記述:
このメソッドはこのパートの内容を設定するための仕組みを提供します。 指定された DataHandler オブジェクトは実際の内容をラップしなければなりません。

定義:
インタフェース Part 内の setDataHandler
オーバーライド:
クラス MimeMessage 内の setDataHandler
パラメータ:
content - コンテンツの DataHandler
例外:
MessagingException
IllegalWriteException - 実装がこのヘッダの変更をサポートしない場合

writeTo

public final void writeTo(OutputStream os)
                   throws IOException,
                          MessagingException
Write out the bytes into the given outputstream.

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

getHeader

public final String[] getHeader(String name)
                         throws MessagingException
指定された名前のヘッダを取得します。

定義:
インタフェース Part 内の getHeader
オーバーライド:
クラス MimeMessage 内の getHeader
パラメータ:
name - ヘッダの名前
戻り値:
ヘッダの配列
例外:
MessagingException
関連項目:
MimeUtility

getHeader

public final String getHeader(String name,
                              String delimiter)
                       throws MessagingException
指定された名前のヘッダを取得します。

定義:
インタフェース MimePart 内の getHeader
オーバーライド:
クラス MimeMessage 内の getHeader
パラメータ:
name - このヘッダの名前
delimiter - 区切り文字
戻り値:
この名前を持つ全てのヘッダに対する値フィールド
例外:
MessagingException

setHeader

public final void setHeader(String name,
                            String value)
                     throws MessagingException
クラス MimeMessage の記述:
この header_name の値を設定します。 既存の全てのヘッダ値をこの新しい値で置き換えます。 RFC 822 ヘッダは US-ASCII 文字のみを含まなければならない為、 US-ASCII 以外の文字を含むヘッダは、呼び出し側により RFC 2047 の規則に従ってエンコードされなければならないことに注意して下さい。

定義:
インタフェース Part 内の setHeader
オーバーライド:
クラス MimeMessage 内の setHeader
パラメータ:
name - ヘッダ名
value - ヘッダ値
例外:
MessagingException
IllegalWriteException - 実装がこのヘッダの変更をサポートしない場合
関連項目:
MimeUtility

addHeader

public final void addHeader(String name,
                            String value)
                     throws MessagingException
クラス MimeMessage の記述:
この値をこの header_name の既存値に追加します。 RFC 822 ヘッダは US-ASCII 文字のみを含まなければならない為、 US-ASCII 以外の文字を含むヘッダは RFC 2047 の規則に従ってエンコードされなければならない事に注意して下さい。

定義:
インタフェース Part 内の addHeader
オーバーライド:
クラス MimeMessage 内の addHeader
パラメータ:
name - ヘッダ名
value - ヘッダ値
例外:
MessagingException
IllegalWriteException - 実装がこのヘッダの変更をサポートしない場合
関連項目:
MimeUtility

removeHeader

public final void removeHeader(String name)
                        throws MessagingException
クラス MimeMessage の記述:
この名前を持つ全てのヘッダを削除します。

定義:
インタフェース Part 内の removeHeader
オーバーライド:
クラス MimeMessage 内の removeHeader
パラメータ:
name - このヘッダの名前
例外:
MessagingException
IllegalWriteException - 実装がこのヘッダの変更をサポートしない場合

getAllHeaders

public final Enumeration getAllHeaders()
                                throws MessagingException
全てのヘッダを取得します。

定義:
インタフェース Part 内の getAllHeaders
オーバーライド:
クラス MimeMessage 内の getAllHeaders
戻り値:
ヘッダオブジェクトの配列
例外:
MessagingException
関連項目:
MimeUtility

getMatchingHeaders

public final Enumeration getMatchingHeaders(String[] names)
                                     throws MessagingException
一致するヘッダを取得します。

定義:
インタフェース Part 内の getMatchingHeaders
オーバーライド:
クラス MimeMessage 内の getMatchingHeaders
戻り値:
Header オブジェクトの配列
例外:
MessagingException

getNonMatchingHeaders

public final Enumeration getNonMatchingHeaders(String[] names)
                                        throws MessagingException
一致しないヘッダを取得します。

定義:
インタフェース Part 内の getNonMatchingHeaders
オーバーライド:
クラス MimeMessage 内の getNonMatchingHeaders
戻り値:
Header オブジェクトの配列
例外:
MessagingException

addHeaderLine

public final void addHeaderLine(String line)
                         throws MessagingException
クラス MimeMessage の記述:
生 RFC 822 ヘッダ行を追加します。

定義:
インタフェース MimePart 内の addHeaderLine
オーバーライド:
クラス MimeMessage 内の addHeaderLine
例外:
MessagingException

getAllHeaderLines

public final Enumeration getAllHeaderLines()
                                    throws MessagingException
Get all header-lines.

定義:
インタフェース MimePart 内の getAllHeaderLines
オーバーライド:
クラス MimeMessage 内の getAllHeaderLines
例外:
MessagingException

getMatchingHeaderLines

public final Enumeration getMatchingHeaderLines(String[] names)
                                         throws MessagingException
Get all matching header-lines.

定義:
インタフェース MimePart 内の getMatchingHeaderLines
オーバーライド:
クラス MimeMessage 内の getMatchingHeaderLines
例外:
MessagingException

getNonMatchingHeaderLines

public final Enumeration getNonMatchingHeaderLines(String[] names)
                                            throws MessagingException
Get all non-matching headerlines.

定義:
インタフェース MimePart 内の getNonMatchingHeaderLines
オーバーライド:
クラス MimeMessage 内の getNonMatchingHeaderLines
例外:
MessagingException

getFlags

public Flags getFlags()
               throws MessagingException
このメッセージの Flags を取得します。

オーバーライド:
クラス MimeMessage 内の getFlags
戻り値:
Flags このメッセージのフラグを含む Flags オブジェクト
例外:
MessagingException
関連項目:
Flags

isSet

public boolean isSet(Flags.Flag flag)
              throws MessagingException
Test if the given Flags are set in this message.

オーバーライド:
クラス MimeMessage 内の isSet
パラメータ:
flag - フラグ
戻り値:
このメッセージの指定されたフラグの値
例外:
MessagingException
関連項目:
Flags.Flag, Flags.Flag.ANSWERED, Flags.Flag.DELETED, Flags.Flag.DRAFT, Flags.Flag.FLAGGED, Flags.Flag.RECENT, Flags.Flag.SEEN

setFlags

public void setFlags(Flags flag,
                     boolean set)
              throws MessagingException
Set/Unset the given flags in this message.

オーバーライド:
クラス MimeMessage 内の setFlags
パラメータ:
flag - 設定されるフラグを含む Flags オブジェクト
set - 設定される値
例外:
MessagingException
IllegalWriteException - 実装が既存値の変更をサポートしない場合
関連項目:
MessageChangedEvent

setPeek

public void setPeek(boolean flag)

getPeek

public boolean getPeek()

invalidateHeaders

public void invalidateHeaders()