ot::net
class MimeHeaderParser
#include "ot/net/MimeHeaderParser.h"
Module class containing helper functions to parse MIME-like headers, such as those employed by HTTP/1.0.
- See also:
-
MimeHeaderSequence
ParseHeaders
static RefPtr< MimeHeaderSequence > ParseHeaders(InputStream* pInputStream)
-
Parses an InputStream and returns a MimeHeaderSequence containing all the MIME-type headers preceding the <CRLF> delimiter.
Mime-type headers comprise a keyword followed by ":" followed by whitespace and the value. If a line begins with whitespace it is a continuation of the preceding line.
A <CRLF> at the start of a line marks the end of the sequence.
- Parameters:
pInputStream -
the InputStream to read from.
- Exceptions:
NullPointerException -
if pInputStream is null.
IOException -
if an I/O error occurs.
ReadLineLatin1
static long ReadLineLatin1(InputStream* pInputStream,
String& retLine)
-
Helper function to read a line from an InputStream into a String.
The line is terminated by a linefeed character. Carriage return characters are silently discarded.
- Parameters:
pInputStream -
the InputStream to read from.
- Returns:
-
A String containing a sequence of characters read from the InputStream. The <CRLF> terminator is not included in the returned String.
- Exceptions:
NullPointerException -
if pInputStream is null.
IOException -
if an I/O error occurs.
Found a bug or missing feature? Please email us at support@elcel.com