| %line | %branch | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| org.apache.commons.net.pop3.POP3MessageInfo |
|
|
| 1 | /* |
|
| 2 | * Copyright 2001-2005 The Apache Software Foundation |
|
| 3 | * |
|
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | * you may not use this file except in compliance with the License. |
|
| 6 | * You may obtain a copy of the License at |
|
| 7 | * |
|
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 9 | * |
|
| 10 | * Unless required by applicable law or agreed to in writing, software |
|
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 13 | * See the License for the specific language governing permissions and |
|
| 14 | * limitations under the License. |
|
| 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 | 0 | { |
| 53 | 0 | number = size = 0; |
| 54 | 0 | identifier = null; |
| 55 | 0 | } |
| 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, class="keyword">int octets) |
|
| 63 | 0 | { |
| 64 | 0 | number = num; |
| 65 | 0 | size = octets; |
| 66 | 0 | identifier = null; |
| 67 | 0 | } |
| 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 | 0 | { |
| 76 | 0 | number = num; |
| 77 | 0 | size = -1; |
| 78 | 0 | identifier = uid; |
| 79 | 0 | } |
| 80 | } |
| This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |