001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019 package javax.xml.soap;
020
021 /**
022 * An object that stores a MIME header name and its value. One or more <CODE>MimeHeader</CODE>
023 * objects may be contained in a <CODE>MimeHeaders</CODE> object.
024 *
025 * @see MimeHeaders MimeHeaders
026 */
027 public class MimeHeader {
028
029 /**
030 * Constructs a <CODE>MimeHeader</CODE> object initialized with the given name and value.
031 *
032 * @param name a <CODE>String</CODE> giving the name of the header
033 * @param value a <CODE>String</CODE> giving the value of the header
034 */
035 public MimeHeader(String name, String value) {
036 this.name = name;
037 this.value = value;
038 }
039
040 /**
041 * Returns the name of this <CODE>MimeHeader</CODE> object.
042 *
043 * @return the name of the header as a <CODE>String</CODE>
044 */
045 public String getName() {
046 return name;
047 }
048
049 /**
050 * Returns the value of this <CODE>MimeHeader</CODE> object.
051 *
052 * @return the value of the header as a <CODE>String</CODE>
053 */
054 public String getValue() {
055 return value;
056 }
057
058 private String name;
059
060 private String value;
061 }