aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/io/Stream.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-17 20:49:37 +0800
committercrupest <crupest@outlook.com>2022-01-17 20:49:37 +0800
commit87658408858dfad8c1fc85b048d46b9a6345580d (patch)
tree03484fb8e64b31fe6e1f146771c423914b922e99 /include/cru/common/io/Stream.hpp
parent0dd9ded17f0b8461d54ccfbc66886395fab0aa98 (diff)
downloadcru-87658408858dfad8c1fc85b048d46b9a6345580d.tar.gz
cru-87658408858dfad8c1fc85b048d46b9a6345580d.tar.bz2
cru-87658408858dfad8c1fc85b048d46b9a6345580d.zip
...
Diffstat (limited to 'include/cru/common/io/Stream.hpp')
-rw-r--r--include/cru/common/io/Stream.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/cru/common/io/Stream.hpp b/include/cru/common/io/Stream.hpp
index fedd4a0f..78beba21 100644
--- a/include/cru/common/io/Stream.hpp
+++ b/include/cru/common/io/Stream.hpp
@@ -2,7 +2,10 @@
#include "../Base.hpp"
+#include "../String.hpp"
+
#include <cstddef>
+#include <vector>
namespace cru::io {
class CRU_BASE_API Stream : public Object {
@@ -33,6 +36,11 @@ class CRU_BASE_API Stream : public Object {
Index Write(const char* buffer, Index offset, Index size);
Index Write(const char* buffer, Index size);
+ virtual std::vector<std::byte> ReadAll();
+
+ // Utf8 encoding.
+ String ReadAllAsString();
+
virtual void Flush();
virtual void Close();