17049c451a
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11909 a95241bf-73f2-0310-859d-f6bbb57e9c96
31 lines
746 B
C++
31 lines
746 B
C++
//----------------------------------------------------------------------
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
// by the OpenBeOS license.
|
|
//
|
|
// Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
|
|
//----------------------------------------------------------------------
|
|
|
|
/*! \file MemoryStream.h
|
|
*/
|
|
|
|
#ifndef _MEMORY_STREAM_H
|
|
#define _MEMORY_STREAM_H
|
|
|
|
#include <DataIO.h>
|
|
|
|
#include "PositionIOStream.h"
|
|
|
|
/*! \brief DataStream implementation that writes directly to a chunk of memory.
|
|
*/
|
|
class MemoryStream : public PositionIOStream {
|
|
public:
|
|
MemoryStream(void *buffer, size_t length);
|
|
virtual status_t InitCheck() const;
|
|
|
|
private:
|
|
BMemoryIO fMemory;
|
|
status_t fInitStatus;
|
|
};
|
|
|
|
#endif // _MEMORY_STREAM_H
|