LineFormatterpublic interface LineFormatter Interface for formatting elements of the HEAD section of an HTTP message.
This is the complement to {@link LineParser}.
There are individual methods for formatting a request line, a
status line, or a header line. The formatting does not include the
trailing line break sequence CR-LF.
Instances of this interface are expected to be stateless and thread-safe.
The formatted lines are returned in memory, the formatter does not depend
on any specific IO mechanism.
In order to avoid unnecessary creation of temporary objects,
a buffer can be passed as argument to all formatting methods.
The implementation may or may not actually use that buffer for formatting.
If it is used, the buffer will first be cleared by the
formatXXX methods.
The argument buffer can always be re-used after the call. The buffer
returned as the result, if it is different from the argument buffer,
MUST NOT be modified.
|
|