KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > soap > MimeHeader


1 /*
2  * $Id: MimeHeader.java,v 1.3 2005/04/05 20:49:48 mk125090 Exp $
3  * $Revision: 1.3 $
4  * $Date: 2005/04/05 20:49:48 $
5  */

6
7 /*
8  * The contents of this file are subject to the terms
9  * of the Common Development and Distribution License
10  * (the License). You may not use this file except in
11  * compliance with the License.
12  *
13  * You can obtain a copy of the license at
14  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
15  * See the License for the specific language governing
16  * permissions and limitations under the License.
17  *
18  * When distributing Covered Code, include this CDDL
19  * Header Notice in each file and include the License file
20  * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
21  * If applicable, add the following below the CDDL Header,
22  * with the fields enclosed by brackets [] replaced by
23  * you own identifying information:
24  * "Portions Copyrighted [year] [name of copyright owner]"
25  *
26  * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
27  */

28 package javax.xml.soap;
29
30
31 /**
32  * An object that stores a MIME header name and its value. One or more
33  * <code>MimeHeader</code> objects may be contained in a <code>MimeHeaders</code>
34  * object.
35  *
36  * @see MimeHeaders
37  */

38 public class MimeHeader {
39
40    private String JavaDoc name;
41    private String JavaDoc value;
42
43    /**
44     * Constructs a <code>MimeHeader</code> object initialized with the given
45     * name and value.
46     *
47     * @param name a <code>String</code> giving the name of the header
48     * @param value a <code>String</code> giving the value of the header
49     */

50     public MimeHeader(String JavaDoc name, String JavaDoc value) {
51     this.name = name;
52     this.value = value;
53     }
54
55     /**
56      * Returns the name of this <code>MimeHeader</code> object.
57      *
58      * @return the name of the header as a <code>String</code>
59      */

60     public String JavaDoc getName() {
61     return name;
62     }
63
64     /**
65      * Returns the value of this <code>MimeHeader</code> object.
66      *
67      * @return the value of the header as a <code>String</code>
68      */

69     public String JavaDoc getValue() {
70     return value;
71     }
72 }
73
Popular Tags