1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.net.pop3;
17
18 /***
19 * POP3MessageInfo is used to return information about messages stored on
20 * a POP3 server. Its fields are used to mean slightly different things
21 * depending on the information being returned.
22 * <p>
23 * In response to a status command, <code> number </code>
24 * contains the number of messages in the mailbox, <code> size </code>
25 * contains the size of the mailbox in bytes, and <code> identifier </code>
26 * is null.
27 * <p>
28 * In response to a message listings, <code> number </code>
29 * contains the message number, <code> size </code> contains the
30 * size of the message in bytes, and <code> identifier </code> is null.
31 * <p>
32 * In response to unique identifier listings, <code> number </code> contains
33 * the message number, <code> size </code> is undefined, and
34 * <code> identifier </code> contains the message's unique identifier.
35 * <p>
36 * <p>
37 * @author Daniel F. Savarese
38 ***/
39
40 public final class POP3MessageInfo
41 {
42 public int number;
43 public int size;
44 public String identifier;
45
46 /***
47 * Creates a POP3MessageInfo instance with <code>number</code> and
48 * <code> size </code> set to 0, and <code>identifier</code> set to
49 * null.
50 ***/
51 public POP3MessageInfo()
52 {
53 number = size = 0;
54 identifier = null;
55 }
56
57 /***
58 * Creates a POP3MessageInfo instance with <code>number</code> set
59 * to <code> num </code>, <code> size </code> set to <code> octets </code>,
60 * and <code>identifier</code> set to null.
61 ***/
62 public POP3MessageInfo(int num, int octets)
63 {
64 number = num;
65 size = octets;
66 identifier = null;
67 }
68
69 /***
70 * Creates a POP3MessageInfo instance with <code>number</code> set
71 * to <code> num </code>, <code> size </code> undefined,
72 * and <code>identifier</code> set to <code>uid</code>.
73 ***/
74 public POP3MessageInfo(int num, String uid)
75 {
76 number = num;
77 size = -1;
78 identifier = uid;
79 }
80 }