com.sun.mail.imap.protocol

## Class IMAPResponse

- java.lang.Object
- - com.sun.mail.iap.Response
  - - com.sun.mail.imap.protocol.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

- - ### Field Summary

    - ### Fields inherited from class com.sun.mail.iap.Response

      `BAD, buffer, BYE, CONTINUATION, ex, index, NO, OK, pindex, size, SYNTHETIC, tag, TAG_MASK, TAGGED, type, TYPE_MASK, UNTAGGED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IMAPResponse(IMAPResponse r)` Copy constructor.
    `IMAPResponse(Protocol c)`
    `IMAPResponse(String r)` For testing.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getKey()`
    `int` | `getNumber()`
    `boolean` | `keyEquals(String k)`
    `String[]` | `readSimpleList()` Read a list of space-separated "flag_extension" sequences and return the list as a array of Strings.

    - ### Methods inherited from class com.sun.mail.iap.Response

      `byeResponse, getException, getRest, getTag, getType, isBAD, isBYE, isContinuation, isNO, isOK, isSynthetic, isTagged, isUnTagged, peekByte, readAtom, readAtomString, readAtomStringList, readByte, readByteArray, readBytes, readLong, readNumber, readString, readString, readStringList, reset, skip, skipSpaces, skipToken, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### IMAPResponse

          public IMAPResponse(Protocol c)
                       throws IOException,
                              ProtocolException

      Throws:
        `IOException`
        `ProtocolException`

    - #### IMAPResponse

          public IMAPResponse(IMAPResponse r)

      Copy constructor.
      Parameters:
        `r` - the IMAPResponse to copy

    - #### IMAPResponse

          public IMAPResponse(String r)
                       throws IOException,
                              ProtocolException

      For testing.
      Parameters:
        `r` - the response string
      Throws:
        `IOException` - for I/O errors
        `ProtocolException` - for protocol failures

  - ### Method Detail

    - #### readSimpleList

          public 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. This is an IMAP-ism, and perhaps this method should moved into the IMAP layer.
      Returns:
        the list items as a String array

    - #### getKey

          public String getKey()

    - #### keyEquals

          public boolean keyEquals(String k)

    - #### getNumber

          public int getNumber()

Copyright © 2016 Oracle. All rights reserved.