1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.mercury.imap.util.section;
14
15 import java.util.List;
16
17 import org.abstracthorizon.mercury.imap.util.Section;
18
19
20
21
22
23
24 public class HeaderSection extends Section {
25
26
27 public boolean all = true;
28
29
30 public boolean not = false;
31
32
33 public List<String> fields = null;
34
35 public String headerFields() {
36 StringBuffer b = new StringBuffer();
37 return b.toString();
38 }
39
40
41
42
43
44 public String toString() {
45 StringBuffer b = new StringBuffer();
46 b.append("HEADER");
47 if (!all) {
48 b.append(".FIELDS");
49 if (not) {
50 b.append(".NOT");
51 }
52 }
53 if ((fields != null) && (fields.size() > 0)) {
54 b.append(" (");
55 for (int i=0; i<fields.size(); i++) {
56 if (i > 0) {
57 b.append(' ');
58 }
59 b.append('"').append(fields.get(i).toString()).append('"');
60 }
61 b.append(')');
62 }
63 return b.toString();
64 }
65 }