aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ConsoleSaveFileOutputStream.h
blob: 1fddeb73e011caccb1948d4e8ea1fe2c87092fad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
// 4J Stu - Implements the Java InputStream but rather than writing directly to disc it writes through the save file

#include "OutputStream.h"

#include "ConsoleSavePath.h"

class ConsoleSaveFile;
class FileEntry;

class ConsoleSaveFileOutputStream : public OutputStream
{
public:
	ConsoleSaveFileOutputStream(ConsoleSaveFile *saveFile, const ConsoleSavePath &file);
	ConsoleSaveFileOutputStream(ConsoleSaveFile *saveFile, FileEntry *file);
	virtual void write(unsigned int b);
	virtual void write(byteArray b);
	virtual void write(byteArray b, unsigned int offset, unsigned int length);
	virtual void close();
	virtual void flush() {}

private:
	ConsoleSaveFile *m_saveFile;
	FileEntry *m_file;
};