Module jakarta.mail

Class IMAPResponse

  • Direct Known Subclasses:
    FetchResponse

    public class IMAPResponse
    extends Response
    This class represents a response obtained from the input stream of an IMAP server.
    Author:
    John Mani
    • Constructor Detail

      • IMAPResponse

        public IMAPResponse​(IMAPResponse r)
        Copy constructor.
        Parameters:
        r - the IMAPResponse to copy
      • IMAPResponse

        public IMAPResponse​(java.lang.String r)
                     throws java.io.IOException,
                            ProtocolException
        For testing.
        Parameters:
        r - the response string
        Throws:
        java.io.IOException - for I/O errors
        ProtocolException - for protocol failures
      • IMAPResponse

        public IMAPResponse​(java.lang.String r,
                            boolean utf8)
                     throws java.io.IOException,
                            ProtocolException
        For testing.
        Parameters:
        r - the response string
        utf8 - UTF-8 allowed?
        Throws:
        java.io.IOException - for I/O errors
        ProtocolException - for protocol failures
        Since:
        JavaMail 1.6.0
    • Method Detail

      • readSimpleList

        public java.lang.String[] readSimpleList()
        Read a list of space-separated "flag-extension" sequences and return the list as a array of Strings. An empty list is returned as null. Each item is expected to be an atom, possibly preceeded by a backslash, but we aren't that strict; we just look for strings separated by spaces and terminated by a right paren. We assume items are always ASCII.
        Returns:
        the list items as a String array
      • getKey

        public java.lang.String getKey()
      • keyEquals

        public boolean keyEquals​(java.lang.String k)
      • getNumber

        public int getNumber()