BinaryData.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef LOTRO_DAT_BINARYDATA_H
  2. #define LOTRO_DAT_BINARYDATA_H
  3. #include <cstdio>
  4. #include <vector>
  5. #include <string>
  6. namespace LOTRO_DAT
  7. {
  8. class Database;
  9. class BinaryData
  10. {
  11. public:
  12. BinaryData();
  13. BinaryData(const BinaryData &d);
  14. BinaryData(BinaryData&& other) noexcept;
  15. BinaryData(const char* data, unsigned int size);
  16. explicit BinaryData(unsigned int size);
  17. ~BinaryData();
  18. unsigned char& operator[] (const unsigned int &pos);
  19. const unsigned char& operator[] (const unsigned int &pos) const;
  20. BinaryData operator +(const BinaryData &b);
  21. bool operator == (const BinaryData &b) const;
  22. bool operator != (const BinaryData &b) const;
  23. bool Empty() const;
  24. void Append(const BinaryData &b, size_t offset = 0);
  25. template <unsigned int T>
  26. long long ToNumber(const long long &pos) const;
  27. template <unsigned int T>
  28. long long ToNumberRAW(const long long &pos) const;
  29. template <unsigned int T>
  30. static BinaryData FromNumber(const long long &number);
  31. template <unsigned int T>
  32. static BinaryData FromNumberRAW(const long long &number);
  33. size_t size() const;
  34. unsigned char* data() const;
  35. BinaryData& operator=(const BinaryData& data);
  36. BinaryData CutData(long long first = 0, long long last = -1) const;
  37. bool WriteToFile(const char *filename) const;
  38. bool WriteToFile(const std::string &filename) const;
  39. void ReadFromFile(const char *filename);
  40. void ReadFromFile(const std::string &filename);
  41. private:
  42. unsigned char *data_;
  43. size_t size_;
  44. };
  45. } // namespace LOTRO_DAT
  46. #endif //LOTRO_DAT_BINARYDATA_H
PANIC: session(release): write data/sessions/1/c/1c29cd264531fa92: no space left on device

PANIC

session(release): write data/sessions/1/c/1c29cd264531fa92: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)