Input stream based on AByteBuffer with memory control, clears byte buffer on destruction.
More...
Input stream based on AByteBuffer with memory control, clears byte buffer on destruction.
|
| AStrongByteBufferInputStream (AByteBuffer buffer) noexcept |
|
| AStrongByteBufferInputStream (_< AByteBuffer > buffer) noexcept |
|
bool | isEof () override |
| returns true if end of stream has been reached More...
|
|
void | seek (std::streamoff offset, std::ios::seekdir seekDir) override |
| change reading position, a way of changing depends on seekDir parameter More...
|
|
size_t | tell () override |
| return current reading position More...
|
|
size_t | read (char *dst, size_t size) override |
| Reads up to size bytes from stream. Blocking (waiting for new data) is allowed. More...
|
|
AByteBuffer & | buffer () noexcept |
|
size_t | fileSize () |
| return size of the stream More...
|
|
size_t | read (std::span< std::byte > destination) |
| Reads up to destination.size() bytes from stream. Blocking (waiting for new data) is allowed. More...
|
|
void | readExact (char *dst, size_t size) |
| Reads exact size bytes from stream. Blocking (waiting for new data) is allowed. More...
|
|
template<typename T > |
T | deserialize () |
|
template<typename T > |
IInputStream & | operator>> (T &dst) |
|
template<typename T > |
IInputStream & | operator>> (T &&dst) |
|
◆ isEof()
bool AStrongByteBufferInputStream::isEof |
( |
| ) |
|
|
overridevirtual |
returns true if end of stream has been reached
- Returns
- true if end of stream has been reached
Implements ISeekableInputStream.
◆ read()
size_t AStrongByteBufferInputStream::read |
( |
char * |
dst, |
|
|
size_t |
size |
|
) |
| |
|
overridevirtual |
Reads up to size
bytes from stream. Blocking (waiting for new data) is allowed.
- Sneaky exceptions
- An implementation can throw any exception that subclasses AIOException.
- Parameters
-
dst | destination buffer |
size | destination buffer's size. > 0 |
- Returns
- number of read bytes (including 0)
Implements IInputStream.
◆ seek()
void AStrongByteBufferInputStream::seek |
( |
std::streamoff |
offset, |
|
|
std::ios::seekdir |
seekDir |
|
) |
| |
|
overridevirtual |
change reading position, a way of changing depends on seekDir parameter
Implements ISeekableInputStream.
◆ tell()
size_t AStrongByteBufferInputStream::tell |
( |
| ) |
|
|
overridevirtual |
#include <AUI/IO/AStrongByteBufferInputStream.h>
The documentation for this class was generated from the following files: