vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / translators / exr / IStreamWrapper.h
blobbe2abbda8301340ebf4cc7c36471731130f5ee5e
1 /*
2 * Copyright 2008, Jérôme Duval. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef ISTREAM_WRAPPER_H
6 #define ISTREAM_WRAPPER_H
8 #include <DataIO.h>
9 #include <ImfIO.h>
11 #include "StreamBuffer.h"
13 using namespace Imf;
15 class IStreamWrapper : public IStream {
16 public:
17 IStreamWrapper(const char *filename, BPositionIO *stream);
18 virtual ~IStreamWrapper();
20 virtual bool read(char c[/*n*/], int n);
21 virtual Int64 tellg();
22 virtual void seekg(Int64 pos);
24 private:
25 StreamBuffer fStream;
28 #endif /* ISTREAM_WRAPPER_H */