FileDocCategorySizeDatePackage
ListInfo.javaAPI DocJavaMail 1.4.33475Tue Nov 17 10:38:10 GMT 2009com.sun.mail.imap.protocol

ListInfo

public class ListInfo extends Object
A LIST response.
author
John Mani
author
Bill Shannon

Fields Summary
public String
name
public char
separator
public boolean
hasInferiors
public boolean
canOpen
public int
changeState
public String[]
attrs
public static final int
CHANGED
public static final int
UNCHANGED
public static final int
INDETERMINATE
Constructors Summary
public ListInfo(IMAPResponse r)


         
	String[] s = r.readSimpleList();

	Vector v = new Vector();	// accumulate attributes
	if (s != null) {
	    // non-empty attribute list
	    for (int i = 0; i < s.length; i++) {
		if (s[i].equalsIgnoreCase("\\Marked"))
		    changeState = CHANGED;
		else if (s[i].equalsIgnoreCase("\\Unmarked"))
		    changeState = UNCHANGED;
		else if (s[i].equalsIgnoreCase("\\Noselect"))
		    canOpen = false;
		else if (s[i].equalsIgnoreCase("\\Noinferiors"))
		    hasInferiors = false;
		v.addElement(s[i]);
	    }
	}
	attrs = new String[v.size()];
	v.copyInto(attrs);

	r.skipSpaces();
	if (r.readByte() == '"") {
	    if ((separator = (char)r.readByte()) == '\\")
		// escaped separator character
		separator = (char)r.readByte();	
	    r.skip(1); // skip <">
	} else // NIL
	    r.skip(2);
	
	r.skipSpaces();
	name = r.readAtomString();

	// decode the name (using RFC2060's modified UTF7)
	name = BASE64MailboxDecoder.decode(name);
    
Methods Summary