using boost::shared_array;
+Data::Data ()
+ : _size (0)
+{
+
+}
+
Data::Data (int size)
: _data (new uint8_t[size])
, _size (size)
if (!f) {
throw FileError (_("could not open file for reading"), file);
}
-
+
size_t const r = fread (_data.get(), 1, _size, f);
if (r != size_t (_size)) {
fclose (f);
throw FileError (_("could not read from file"), file);
}
-
+
fclose (f);
}