1//----------------------------------------------------------------------
2//  This software is part of the OpenBeOS distribution and is covered
3//  by the OpenBeOS license.
4//
5//  Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
6//----------------------------------------------------------------------
7
8/*! \file MemoryStream.h
9*/
10
11#ifndef _MEMORY_STREAM_H
12#define _MEMORY_STREAM_H
13
14#include <DataIO.h>
15
16#include "PositionIOStream.h"
17
18/*! \brief 	DataStream implementation that writes directly to a chunk of memory.
19*/
20class MemoryStream : public PositionIOStream {
21public:
22	MemoryStream(void *buffer, size_t length);
23	virtual status_t InitCheck() const;
24
25private:
26	BMemoryIO fMemory;
27	status_t fInitStatus;
28};
29
30#endif	// _MEMORY_STREAM_H
31