aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/BufferedOutputStream.h
blob: 19c79d6c67181d116362bd326d3121cf23f57247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "OutputStream.h"

class BufferedOutputStream : public OutputStream
{
private:
	OutputStream *stream;

protected :
	byteArray		buf; // The internal buffer where data is stored.
	unsigned int	count; // The number of valid bytes in the buffer.

public:
	BufferedOutputStream(OutputStream *out, int size);
	~BufferedOutputStream();

	virtual void flush();
	virtual void close();
	virtual void write(byteArray b, unsigned int offset, unsigned int length);
	virtual void write(byteArray b);
	virtual void write(unsigned int b);
};