View Javadoc
1   /*
2    * Copyright 2001-2004 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 javax.xml.soap;
17  
18  /**
19   * An object that stores a MIME header name and its value. One
20   *   or more <CODE>MimeHeader</CODE> objects may be contained in a
21   *   <CODE>MimeHeaders</CODE> object.
22   * @see MimeHeaders MimeHeaders
23   */
24  public class MimeHeader {
25  
26      /**
27       * Constructs a <CODE>MimeHeader</CODE> object initialized
28       * with the given name and value.
29       * @param  name a <CODE>String</CODE> giving the
30       *     name of the header
31       * @param  value a <CODE>String</CODE> giving the
32       *     value of the header
33       */
34      public MimeHeader(String name, String value) {
35          this.name  = name;
36          this.value = value;
37      }
38  
39      /**
40       * Returns the name of this <CODE>MimeHeader</CODE>
41       * object.
42       * @return  the name of the header as a <CODE>String</CODE>
43       */
44      public String getName() {
45          return name;
46      }
47  
48      /**
49       * Returns the value of this <CODE>MimeHeader</CODE>
50       * object.
51       * @return the value of the header as a <CODE>String</CODE>
52       */
53      public String getValue() {
54          return value;
55      }
56  
57      private String name;
58  
59      private String value;
60  }