FileDocCategorySizeDatePackage
Status.javaAPI DocGlassfish v2 API3415Mon May 14 15:28:44 BST 2007com.sun.mail.imap.protocol

Status

public class Status extends Object
STATUS response.
version
1.8, 07/05/04
author
John Mani

Fields Summary
public String
mbox
public int
total
public int
recent
public long
uidnext
public long
uidvalidity
public int
unseen
static final String[]
standardItems
Constructors Summary
public Status(Response r)


         
	mbox = r.readAtomString(); // mailbox := astring
	r.skipSpaces();
	if (r.readByte() != '(")
	    throw new ParsingException("parse error in STATUS");
	
	do {
	    String attr = r.readAtom();
	    if (attr.equalsIgnoreCase("MESSAGES"))
		total = r.readNumber();
	    else if (attr.equalsIgnoreCase("RECENT"))
		recent = r.readNumber();
	    else if (attr.equalsIgnoreCase("UIDNEXT"))
		uidnext = r.readLong();
	    else if (attr.equalsIgnoreCase("UIDVALIDITY"))
		uidvalidity = r.readLong();
	    else if (attr.equalsIgnoreCase("UNSEEN"))
		unseen = r.readNumber();
	} while (r.readByte() != ')");
    
Methods Summary
public static voidadd(com.sun.mail.imap.protocol.Status s1, com.sun.mail.imap.protocol.Status s2)

	if (s2.total != -1)
	    s1.total = s2.total;
	if (s2.recent != -1)
	    s1.recent = s2.recent;
	if (s2.uidnext != -1)
	    s1.uidnext = s2.uidnext;
	if (s2.uidvalidity != -1)
	    s1.uidvalidity = s2.uidvalidity;
	if (s2.unseen != -1)
	    s1.unseen = s2.unseen;