blob: 8acc0b198f392a653dc9fbecdc2f963c44b76099 (
plain) (
blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
//
// MemoryStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: MemoryStream
//
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/MemoryStream.h"
namespace Poco {
MemoryIOS::MemoryIOS(char* pBuffer, std::streamsize bufferSize):
_buf(pBuffer, bufferSize)
{
poco_ios_init(&_buf);
}
MemoryIOS::~MemoryIOS()
{
}
MemoryInputStream::MemoryInputStream(const char* pBuffer, std::streamsize bufferSize):
MemoryIOS(const_cast<char*>(pBuffer), bufferSize),
std::istream(&_buf)
{
}
MemoryInputStream::~MemoryInputStream()
{
}
MemoryOutputStream::MemoryOutputStream(char* pBuffer, std::streamsize bufferSize):
MemoryIOS(pBuffer, bufferSize),
std::ostream(&_buf)
{
}
MemoryOutputStream::~MemoryOutputStream()
{
}
} // namespace Poco
|