This is really a JavaMail question... you can see the source now to see
how it's different. a) counts the number of "Received:" headers in the
message. b) counts the number of lines of "Received:" headers (I do
believe). So,
Received: from here
by us
on now
Received: from overhere
by them
on yesterday
with a) count = 2, with b) count = 6
--
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
Noel J. Bergman wrote:
> What is the difference between:
>
> for (Enumeration e = mm.getAllHeaders(); e.hasMoreElements();) {
> Header hdr = (Header)e.nextElement();
> if (hdr.getName().equals("Received")) {
> count++;
> }
> }
>
> and
>
> String headers[] = message.getHeader("Received");
> count = headers.length;
>
> If I'm not missing something, I'd just as soon make the code clearer (second
> version).
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>