com.sun.mail.imap.protocol
Class IMAPResponse

java.lang.Object
  extended by com.sun.mail.iap.Response
      extended by 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, index, NO, OK, pindex, size, SYNTHETIC, tag, TAG_MASK, TAGGED, type, TYPE_MASK, UNTAGGED
 
Constructor Summary
IMAPResponse(IMAPResponse r)
          Copy constructor.
IMAPResponse(Protocol c)
           
 
Method Summary
 java.lang.String getKey()
           
 int getNumber()
           
 boolean keyEquals(java.lang.String k)
           
static IMAPResponse readResponse(Protocol p)
           
 java.lang.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, getRest, getTag, getType, isBAD, isBYE, isContinuation, isNO, isOK, isSynthetic, isTagged, isUnTagged, peekByte, readAtom, readAtom, readAtomString, 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 java.io.IOException,
                    ProtocolException
Throws:
java.io.IOException
ProtocolException

IMAPResponse

public IMAPResponse(IMAPResponse r)
Copy constructor.

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. This is an IMAP-ism, and perhaps this method should moved into the IMAP layer.


getKey

public java.lang.String getKey()

keyEquals

public boolean keyEquals(java.lang.String k)

getNumber

public int getNumber()

readResponse

public static IMAPResponse readResponse(Protocol p)
                                 throws java.io.IOException,
                                        ProtocolException
Throws:
java.io.IOException
ProtocolException


Copyright © 2011 Sun Microsystems, Inc.. All Rights Reserved.