BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / translators / exr / IStreamWrapper.cpp
blob137e13c886428c4a9851fadd7fa6f0ae56aaabe2
1 /*
2 * Copyright 2008, Jérôme Duval. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "IStreamWrapper.h"
9 IStreamWrapper::IStreamWrapper(const char *filename, BPositionIO *stream)
10 : IStream(filename),
11 fStream(stream, 2048)
16 IStreamWrapper::~IStreamWrapper()
21 bool
22 IStreamWrapper::read(char c[/*n*/], int n)
24 int actual = fStream.Read(c, n);
25 if (actual < B_OK) {
28 return (actual == n);
32 Int64
33 IStreamWrapper::tellg()
35 return fStream.Position();
39 void
40 IStreamWrapper::seekg(Int64 pos)
42 fStream.Seek(pos, SEEK_SET);