Reader of formatted input.
More...
#include <base/string/FormatInputStream.h>
Inherits FilterInputStream.
Reader of formatted input.
Format input stream. This class is not MT-safe.
- See also
- FormatOutputStream
- Version
- 1.0
- Examples
- testsuite/client.cpp, testsuite/ftp.cpp, testsuite/http.cpp, and testsuite/server.cpp.
◆ FormatInputStream()
FormatInputStream::FormatInputStream |
( |
InputStream & |
in | ) |
|
Initializes the format input stream.
- Parameters
-
◆ ~FormatInputStream()
FormatInputStream::~FormatInputStream |
( |
| ) |
|
Destroys the format input stream.
◆ appendFromSource()
bool FormatInputStream::appendFromSource |
( |
| ) |
|
|
protected |
Fills the internal buffer with bytes from the input stream without removing any characters already in the buffer.
◆ available()
unsigned int FormatInputStream::available |
( |
| ) |
const |
|
virtual |
◆ getCharacter()
char FormatInputStream::getCharacter |
( |
| ) |
|
|
inline |
Reads one character from the stream.
◆ getLine()
String FormatInputStream::getLine |
( |
| ) |
|
Reads one line from the stream.
◆ getWord()
String FormatInputStream::getWord |
( |
| ) |
|
Reads one word from the stream.
◆ overwriteFromSource()
bool FormatInputStream::overwriteFromSource |
( |
| ) |
|
|
protected |
Fills the internal buffer with bytes from the input stream. Removes any characters already in the buffer.
◆ read()
unsigned int FormatInputStream::read |
( |
uint8 * |
buffer, |
|
|
unsigned int |
size, |
|
|
bool |
nonblocking = false |
|
) |
| |
|
virtual |
Fills the specified buffer with bytes from the stream. Blocks if asked to read more bytes than available.
- Parameters
-
buffer | The buffer to receive the bytes. |
size | The size of the buffer. |
nonblocking | Specifies that the method may not block. Default is false. |
- Returns
- The actual number of bytes read from the stream.
Reimplemented from FilterInputStream.
◆ buffer
◆ head
The current write position.
◆ line
String FormatInputStream::line |
|
protected |
◆ LINE_GRANULARITY
constexpr unsigned int FormatInputStream::LINE_GRANULARITY = 1024 |
|
staticconstexpr |
Specifies the default line granularity.
◆ tail
ReadIterator FormatInputStream::tail |
|
protected |
The current read position.
◆ WINDOW_SIZE
constexpr unsigned int FormatInputStream::WINDOW_SIZE = 4096 |
|
staticconstexpr |
Specifies the window size.