MimeHeader
objects, which represent
the MIME headers present in a MIME part of a message.
This class is used primarily when an application wants to
retrieve specific attachments based on certain MIME headers and
values. This class will most likely be used by implementations of
AttachmentPart
and other MIME dependent parts of the SAAJ
API.
SOAPMessage#getAttachments
, AttachmentPart
Modifier and Type | Class and Description |
---|---|
pack-priv static class |
Modifier and Type | Field and Description |
---|---|
private Vector |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | |
public Iterator | Returns: anIterator object over this MimeHeaders
object's list of MimeHeader objectsReturns all the |
public String[] | |
public Iterator | Returns: anIterator object over the MimeHeader
objects whose name matches one of the names in the given listan array of names)String objects with the names
for which to searchReturns all the |
public Iterator | Returns: anIterator object over the MimeHeader
objects whose name does not match one of the names in the given listan array of names)String objects with the names
for which to searchReturns all of the |
public void | |
public void | removeHeader(String
a name)String with the name of the header for
which to searchRemove all |
public void | setHeader(String
a name, String String with the name of the header for
which to searcha value)String with the value that will replace the
current value of the specified headerReplaces the current value of the first header entry whose name matches the given name with the given value, adding a new header if no existing header name matches. |
headers | back to summary |
---|---|
private Vector<MimeHeader> headers |
MimeHeaders | back to summary |
---|---|
public MimeHeaders() Constructs a default |
addHeader | back to summary |
---|---|
public void addHeader(String name, String value) Adds a Note that RFC822 headers can contain only US-ASCII characters.
|
getAllHeaders | back to summary |
---|---|
public Iterator Returns all the
|
getHeader | back to summary |
---|---|
public String[] getHeader(String name) Returns all of the values for the specified header as an array of
|
getMatchingHeaders | back to summary |
---|---|
public Iterator Returns all the
|
getNonMatchingHeaders | back to summary |
---|---|
public Iterator Returns all of the
|
removeAllHeaders | back to summary |
---|---|
public void removeAllHeaders() Removes all the header entries from this |
removeHeader | back to summary |
---|---|
public void removeHeader(String name) Remove all
|
setHeader | back to summary |
---|---|
public void setHeader(String name, String value) Replaces the current value of the first header entry whose name matches the given name with the given value, adding a new header if no existing header name matches. This method also removes all matching headers after the first one. Note that RFC822 headers can contain only US-ASCII characters.
|
Modifier and Type | Field and Description |
---|---|
private final Iterator | |
private final boolean | |
private final String[] | |
private MimeHeader |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public boolean | |
public MimeHeader | |
private MimeHeader | |
public void | remove()
Overrides default java. |
iterator | back to summary |
---|---|
private final Iterator<MimeHeader> iterator |
match | back to summary |
---|---|
private final boolean match |
names | back to summary |
---|---|
private final String[] names |
nextHeader | back to summary |
---|---|
private MimeHeader nextHeader |
MatchingIterator | back to summary |
---|---|
pack-priv MatchingIterator(String[] names, boolean match, Iterator<MimeHeader> i) |
hasNext | back to summary |
---|---|
public boolean hasNext() Implements java. Doc from java. Returns
|
next | back to summary |
---|---|
public MimeHeader next() Implements java. Doc from java. Returns the next element in the iteration.
|
nextMatch | back to summary |
---|---|
private MimeHeader nextMatch() |
remove | back to summary |
---|---|
public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
|