1 21 22 27 28 package com.sun.mail.imap.protocol; 29 30 import java.util.Vector ; 31 32 import com.sun.mail.iap.*; 33 34 41 42 public class ListInfo { 43 public String name = null; 44 public char separator = '/'; 45 public boolean hasInferiors = true; 46 public boolean canOpen = true; 47 public int changeState = INDETERMINATE; 48 public String [] attrs; 49 50 public static final int CHANGED = 1; 51 public static final int UNCHANGED = 2; 52 public static final int INDETERMINATE = 3; 53 54 public ListInfo(IMAPResponse r) throws ParsingException { 55 String [] s = r.readSimpleList(); 56 57 Vector v = new Vector (); if (s != null) { 59 for (int i = 0; i < s.length; i++) { 61 if (s[i].equalsIgnoreCase("\\Marked")) 62 changeState = CHANGED; 63 else if (s[i].equalsIgnoreCase("\\Unmarked")) 64 changeState = UNCHANGED; 65 else if (s[i].equalsIgnoreCase("\\Noselect")) 66 canOpen = false; 67 else if (s[i].equalsIgnoreCase("\\Noinferiors")) 68 hasInferiors = false; 69 v.addElement(s[i]); 70 } 71 } 72 attrs = new String [v.size()]; 73 v.copyInto(attrs); 74 75 r.skipSpaces(); 76 if (r.readByte() == '"') { 77 if ((separator = (char)r.readByte()) == '\\') 78 separator = (char)r.readByte(); 80 r.skip(1); } else r.skip(2); 83 84 r.skipSpaces(); 85 name = r.readAtomString(); 86 87 name = BASE64MailboxDecoder.decode(name); 89 } 90 } 91 | Popular Tags |