Arduino DLNA Server
NullPrint.h
Go to the documentation of this file.
1 #include "Print.h"
2 
3 namespace tiny_dlna {
4 
5 /***
6  * @brief Class with does not do any output: it can be used to determine
7  * the length of the output
8  * @author Phil Schatzmann
9  * @copyright GPLv3
10  */
11 class NullPrint : public Print {
12  size_t write(uint8_t ch) override { return 1; }
13  size_t write(const uint8_t* buffer, size_t size) override { return size; }
14 };
15 
16 } // namespace tiny_dlna
Definition: NullPrint.h:11
Definition: Allocator.h:6