the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 23 lines 547 B view raw
1#pragma once 2 3#include "OutputStream.h" 4 5class BufferedOutputStream : public OutputStream 6{ 7private: 8 OutputStream *stream; 9 10protected : 11 byteArray buf; // The internal buffer where data is stored. 12 unsigned int count; // The number of valid bytes in the buffer. 13 14public: 15 BufferedOutputStream(OutputStream *out, int size); 16 ~BufferedOutputStream(); 17 18 virtual void flush(); 19 virtual void close(); 20 virtual void write(byteArray b, unsigned int offset, unsigned int length); 21 virtual void write(byteArray b); 22 virtual void write(unsigned int b); 23};