Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::io::Stream Class Reference

Public Member Functions

 Stream (const ByteArray &data)
 
size_t read (ByteArray &buffer, const size_t &len)
 
size_t write (ByteArray &buffer, const size_t &len)
 
bool eof ()
 
bool seek (const size_t &pos)
 
size_t tell ()
 
size_t size ()
 
void align (size_t alignment)
 Move stream position to be aligned.
 
std::string readStringToNull (const size_t &maxLength=32767)
 Read a string until either the null character '\0' is found or up to the maximum length.
 
std::string readString (const size_t &length)
 Read a string of specified length.
 
template<typename T >
readValue (bool little_endian=true)
 read a value from the stream and move the cursor
 
void trim ()
 Remove all data that are already already read.
 
void appendData (const ByteArray &data)
 Add additional data at the end of the stream.
 
const ByteArray getData () const
 
template<>
bool readValue (bool little_endian)
 
template<>
uint8_t readValue (bool little_endian)
 
template<>
int8_t readValue (bool little_endian)
 

Member Function Documentation

◆ appendData()

void oe::io::Stream::appendData ( const ByteArray &  data)
inline

Add additional data at the end of the stream.

Todo:
Whats the difference with write() ?

The documentation for this class was generated from the following file: