325N/A * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. Oracle designates this 325N/A * particular file as subject to the "Classpath" exception as provided 325N/A * by Oracle in the LICENSE file that accompanied this code. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A * or visit www.oracle.com if you need additional information or have any 325N/A * A container for <code>MimeHeader</code> objects, which represent 325N/A * the MIME headers present in a MIME part of a message. 325N/A * <p>This class is used primarily when an application wants to 325N/A * retrieve specific attachments based on certain MIME headers and 325N/A * values. This class will most likely be used by implementations of 325N/A * <code>AttachmentPart</code> and other MIME dependent parts of the SAAJ 325N/A * @see SOAPMessage#getAttachments 325N/A * Constructs a default <code>MimeHeaders</code> object initialized with 325N/A * an empty <code>Vector</code> object. 325N/A * Returns all of the values for the specified header as an array of 325N/A * <code>String</code> objects. 325N/A * @param name the name of the header for which values will be returned 325N/A * @return a <code>String</code> array with all of the values for the 325N/A * Replaces the current value of the first header entry whose name matches 325N/A * the given name with the given value, adding a new header if no existing header 325N/A * name matches. This method also removes all matching headers after the first one. 325N/A * Note that RFC822 headers can contain only US-ASCII characters. 325N/A * @param name a <code>String</code> with the name of the header for 325N/A * @param value a <code>String</code> with the value that will replace the 325N/A * current value of the specified header 325N/A * @exception IllegalArgumentException if there was a problem in the 325N/A * mime header name or the value being set 325N/A * Adds a <code>MimeHeader</code> object with the specified name and value 325N/A * to this <code>MimeHeaders</code> object's list of headers. 325N/A * Note that RFC822 headers can contain only US-ASCII characters. 325N/A * @param name a <code>String</code> with the name of the header to 325N/A * @param value a <code>String</code> with the value of the header to 325N/A * @exception IllegalArgumentException if there was a problem in the 325N/A * mime header name or value being added 325N/A * Remove all <code>MimeHeader</code> objects whose name matches the 325N/A * @param name a <code>String</code> with the name of the header for 325N/A * Removes all the header entries from this <code>MimeHeaders</code> object. 325N/A * Returns all the <code>MimeHeader</code>s in this <code>MimeHeaders</code> object. 325N/A * @return an <code>Iterator</code> object over this <code>MimeHeaders</code> 325N/A * object's list of <code>MimeHeader</code> objects 325N/A // hasNext should've prefetched the header for us, 325N/A * Returns all the <code>MimeHeader</code> objects whose name matches 325N/A * a name in the given array of names. 325N/A * @param names an array of <code>String</code> objects with the names 325N/A * @return an <code>Iterator</code> object over the <code>MimeHeader</code> 325N/A * objects whose name matches one of the names in the given list 325N/A * Returns all of the <code>MimeHeader</code> objects whose name does not 325N/A * match a name in the given array of names. 325N/A * @param names an array of <code>String</code> objects with the names 325N/A * @return an <code>Iterator</code> object over the <code>MimeHeader</code> 325N/A * objects whose name does not match one of the names in the given list