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