ccs.mime
Class MimeHeaderComments
java.lang.Object
ccs.mime.MimeHeaderComments
public class MimeHeaderComments
- extends java.lang.Object
The basic MIME header syntax defines a name/value pair. However, the
value part may contain embedded comments, in brackets. This class
parses the raw value into the value body and a set of comments.
The comment order is preserved, but their positions are not. Where
comments are nested (this is allowed) inner comments are not de-nested.
(If you need to analyse comments further, create a new MimeHeaderComments
on each of the top-level comments, recursively.) MT-UNSAFE.
- See Also:
(uses this internally, during parsing).
Field Summary |
java.lang.String[] |
comments
The comments. |
java.lang.String |
value
The value itself, without embedded comments. |
Constructor Summary |
MimeHeaderComments(java.lang.String raw,
boolean isDiscard)
Parse a MIME header value into the value itself and the set of
embedded comments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
public java.lang.String value
- The value itself, without embedded comments.
comments
public java.lang.String[] comments
- The comments. The delimiting brackets have been removed.
MimeHeaderComments
public MimeHeaderComments(java.lang.String raw,
boolean isDiscard)
- Parse a MIME header value into the value itself and the set of
embedded comments.
- Parameters:
raw
- The raw value string, including embedded comments.isDiscard
- Whether to simply throw comments away, rather than
storing them.