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
020 package javax.xml.soap;
021
022 /**
023 * An object that stores a MIME header name and its value. One
024 * or more <CODE>MimeHeader</CODE> objects may be contained in a
025 * <CODE>MimeHeaders</CODE> object.
026 * @see MimeHeaders MimeHeaders
027 */
028 public class MimeHeader {
029
030 /**
031 * Constructs a <CODE>MimeHeader</CODE> object initialized
032 * with the given name and value.
033 * @param name a <CODE>String</CODE> giving the
034 * name of the header
035 * @param value a <CODE>String</CODE> giving the
036 * value of the header
037 */
038 public MimeHeader(String name, String value) {
039 this.name = name;
040 this.value = value;
041 }
042
043 /**
044 * Returns the name of this <CODE>MimeHeader</CODE>
045 * object.
046 * @return the name of the header as a <CODE>String</CODE>
047 */
048 public String getName() {
049 return name;
050 }
051
052 /**
053 * Returns the value of this <CODE>MimeHeader</CODE>
054 * object.
055 * @return the value of the header as a <CODE>String</CODE>
056 */
057 public String getValue() {
058 return value;
059 }
060
061 private String name;
062
063 private String value;
064 }