1 /*
2 * $Id: MimeHeader.java,v 1.2 2004/04/02 01:24:17 ofung Exp $
3 * $Revision: 1.2 $
4 * $Date: 2004/04/02 01:24:17 $
5 */
6
7 /*
8 * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
9 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
10 *
11 * This code is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License version 2 only, as
13 * published by the Free Software Foundation. Sun designates this
14 * particular file as subject to the "Classpath" exception as provided
15 * by Sun in the LICENSE file that accompanied this code.
16 *
17 * This code is distributed in the hope that it will be useful, but WITHOUT
18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * version 2 for more details (a copy is included in the LICENSE file that
21 * accompanied this code).
22 *
23 * You should have received a copy of the GNU General Public License version
24 * 2 along with this work; if not, write to the Free Software Foundation,
25 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
27 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
28 * CA 95054 USA or visit www.sun.com if you need additional information or
29 * have any questions.
30 */
31 package javax.xml.soap;
32
33
34 /**
35 * An object that stores a MIME header name and its value. One or more
36 * <code>MimeHeader</code> objects may be contained in a <code>MimeHeaders</code>
37 * object.
38 *
39 * @see MimeHeaders
40 */
41 public class MimeHeader {
42
43 private String name;
44 private String value;
45
46 /**
47 * Constructs a <code>MimeHeader</code> object initialized with the given
48 * name and value.
49 *
50 * @param name a <code>String</code> giving the name of the header
51 * @param value a <code>String</code> giving the value of the header
52 */
53 public MimeHeader(String name, String value) {
54 this.name = name;
55 this.value = value;
56 }
57
58 /**
59 * Returns the name of this <code>MimeHeader</code> object.
60 *
61 * @return the name of the header as a <code>String</code>
62 */
63 public String getName() {
64 return name;
65 }
66
67 /**
68 * Returns the value of this <code>MimeHeader</code> object.
69 *
70 * @return the value of the header as a <code>String</code>
71 */
72 public String getValue() {
73 return value;
74 }
75 }