> It only knows the preferred order for headers created with the
> InternetHeaders() constructor.  It does not appear to know
> about the preferred order when an InternetHeaders object is
> created from a stream.

I shouldn't need to know this, but IIRC (I'm not testing this specifically):

  InternetHeaders headers = new InternetHeaders(is);
  headers.setHeader("Return-Path", ...);
  headers.setHeader("MIME-Version", "1.0");

and

  InternetHeaders headers = new InternetHeaders();
  headers.load(is);
  headers.setHeader("Return-Path", ...);
  headers.setHeader("MIME-Version", "1.0");

are not the same.  Assuming that neither header exists in the stream, in the
first case, the Return-Path will follow other headers, and in the latter
case, the MIME-Version will appear before headers loaded from the stream,
since those headers are loaded as lines after the invisible placeholders.

        --- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to