Class GmailFolder

  • All Implemented Interfaces:
    ResponseHandler, java.lang.AutoCloseable, UIDFolder

    public class GmailFolder
    extends IMAPFolder
    A Gmail folder. Defines new FetchProfile items and uses GmailMessage to store additional Gmail message attributes.
    Since:
    JavaMail 1.4.6
    • Constructor Detail

      • GmailFolder

        protected GmailFolder​(java.lang.String fullName,
                              char separator,
                              IMAPStore store,
                              java.lang.Boolean isNamespace)
        Constructor used to create a possibly non-existent folder.
        Parameters:
        fullName - fullname of this folder
        separator - the default separator character for this folder's namespace
        store - the Store
        isNamespace - does this name represent a namespace?
      • GmailFolder

        protected GmailFolder​(ListInfo li,
                              IMAPStore store)
        Constructor used to create an existing folder.
        Parameters:
        li - the ListInfo for this folder
        store - the store containing this folder
    • Method Detail

      • setLabels

        public void setLabels​(Message[] msgs,
                              java.lang.String[] labels,
                              boolean set)
                       throws MessagingException
        Set the specified labels for the given array of messages.
        Parameters:
        msgs - the messages
        labels - the labels to add or remove
        set - true to add, false to remove
        Throws:
        MessagingException - for failures
        Since:
        JavaMail 1.5.5
      • setLabels

        public void setLabels​(int start,
                              int end,
                              java.lang.String[] labels,
                              boolean set)
                       throws MessagingException
        Set the specified labels for the given range of message numbers.
        Parameters:
        start - first message number
        end - last message number
        labels - the labels to add or remove
        set - true to add, false to remove
        Throws:
        MessagingException - for failures
        Since:
        JavaMail 1.5.5
      • setLabels

        public void setLabels​(int[] msgnums,
                              java.lang.String[] labels,
                              boolean set)
                       throws MessagingException
        Set the specified labels for the given array of message numbers.
        Parameters:
        msgnums - the message numbers
        labels - the labels to add or remove
        set - true to add, false to remove
        Throws:
        MessagingException - for failures
        Since:
        JavaMail 1.5.5
      • newIMAPMessage

        protected IMAPMessage newIMAPMessage​(int msgnum)
        Create a new IMAPMessage object to represent the given message number.
        Overrides:
        newIMAPMessage in class IMAPFolder
        Parameters:
        msgnum - the message sequence number
        Returns:
        the new IMAPMessage object