45 // ------------------------------------------------------------------------------------------------- |
45 // ------------------------------------------------------------------------------------------------- |
46 // |
46 // |
47 Bytestream::Bytestream (const unsigned char* data, unsigned long length) : |
47 Bytestream::Bytestream (const unsigned char* data, unsigned long length) : |
48 m_data (nullptr) |
48 m_data (nullptr) |
49 { |
49 { |
50 m_data = nullptr; |
|
51 init (data, length); |
50 init (data, length); |
52 } |
51 } |
53 |
52 |
54 // ------------------------------------------------------------------------------------------------- |
53 // ------------------------------------------------------------------------------------------------- |
55 // |
54 // |
56 Bytestream::Bytestream (const Vector<unsigned char>& bytes) : |
55 Bytestream::Bytestream (const Vector<unsigned char>& bytes) : |
57 m_data (nullptr) |
56 m_data (nullptr) |
58 { |
57 { |
59 init (bytes.data(), bytes.size()); |
58 init (bytes.data(), bytes.size()); |
|
59 } |
|
60 |
|
61 // ------------------------------------------------------------------------------------------------- |
|
62 // |
|
63 Bytestream::Bytestream (const Bytestream& other) : |
|
64 m_data (nullptr) |
|
65 { |
|
66 init (other.data(), other.written_length()); |
|
67 } |
|
68 |
|
69 // ------------------------------------------------------------------------------------------------- |
|
70 METHOD Bytestream::operator= (const Bytestream& other) -> Bytestream& |
|
71 { |
|
72 init (other.data(), other.written_length()); |
|
73 return *this; |
60 } |
74 } |
61 |
75 |
62 // ------------------------------------------------------------------------------------------------- |
76 // ------------------------------------------------------------------------------------------------- |
63 // |
77 // |
64 Bytestream::~Bytestream() |
78 Bytestream::~Bytestream() |