libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / bin / makeudfimage / MemoryStream.cpp
blob8f3b360f2ee320fe043bf1dc3374e22b84f37267
1 //----------------------------------------------------------------------
2 // This software is part of the OpenBeOS distribution and is covered
3 // by the MIT License.
4 //
5 // Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
6 //----------------------------------------------------------------------
8 /*! \file MemoryStream.cpp
9 */
11 #include "MemoryStream.h"
13 #include <stdlib.h>
14 #include <string.h>
16 MemoryStream::MemoryStream(void *buffer, size_t length)
17 : PositionIOStream(fMemory)
18 , fMemory(buffer, length)
19 , fInitStatus(buffer ? B_OK : B_NO_INIT)
23 status_t
24 MemoryStream::InitCheck() const
26 status_t error = PositionIOStream::InitCheck();
27 if (!error)
28 error = fInitStatus;
29 return error;