Represents an input stream.
#include <AUI/IO/IInputStream.h>
|
virtual size_t | read (char *dst, size_t size)=0 |
| Reads up to size bytes from stream. Blocking (waiting for new data) is allowed.
|
|
size_t | read (std::span< std::byte > destination) |
| Reads up to destination.size() bytes from stream. Blocking (waiting for new data) is allowed.
|
|
void | readExact (char *dst, size_t size) |
| Reads exact size bytes from stream. Blocking (waiting for new data) is allowed.
|
|
template<typename T> |
T | deserialize () |
|
template<typename T> |
IInputStream & | operator>> (T &dst) |
|
template<typename T> |
IInputStream & | operator>> (T &&dst) |
|
◆ deserialize()#
template<typename T>
T IInputStream::deserialize |
( |
| ) |
|
|
inline |
◆ operator>>() [1/2]#
◆ operator>>() [2/2]#
◆ read() [1/2]#
virtual size_t IInputStream::read |
( |
char * | dst, |
|
|
size_t | size ) |
|
pure virtual |
- 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)
Implemented in AByteBufferInputStream, AConcatInputStream, ADynamicPipe, AFileInputStream, ALimitedInputStream, AOggSoundStream, AOpusSoundPipe, APipe, ARandomInputStream, ARawSoundStream, ASoundResampler, AStringStream, AStrongByteBufferInputStream, ATcpSocket, AVorbisSoundPipe, AWavSoundStream, Pipe, and PipeInputStream.
◆ read() [2/2]#
size_t IInputStream::read |
( |
std::span< std::byte > | destination | ) |
|
|
inline |
- Sneaky exceptions
- An implementation can throw any exception that subclasses AIOException.
- Parameters
-
destination | destination buffer |
- Returns
- number of read bytes (including 0)
◆ readExact()#
void IInputStream::readExact |
( |
char * | dst, |
|
|
size_t | size ) |
|
inline |
- Sneaky exceptions
- An implementation can throw any exception that subclasses AIOException.
- Exceptions
-
- Parameters
-
dst | destination buffer. |
size | destination buffer's size. |