Write the headers to a stream.
a HeaderList
a FormatOptions or null
output stream
the number of bytes written or %-1 on fail.