AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ALimitedInputStream Class Reference

Input stream that will pass through a maximum of a certain number of bytes - then it will return eof (end of stream) More...

#include <AUI/IO/ALimitedInputStream.h>

Public Member Functions

 ALimitedInputStream (const _< IInputStream > &inputStream, size_t limit)
 
size_t read (char *dst, size_t size) override
 Reads up to size bytes from stream. Blocking (waiting for new data) is allowed.
 
- Public Member Functions inherited from IInputStream
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>
deserialize ()
 
template<typename T>
IInputStreamoperator>> (T &dst)
 
template<typename T>
IInputStreamoperator>> (T &&dst)
 

Detailed Description

Input stream that will pass through a maximum of a certain number of bytes - then it will return eof (end of stream)

Member Function Documentation

◆ read()

size_t ALimitedInputStream::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
dstdestination buffer
sizedestination buffer's size. > 0
Returns
number of read bytes (including 0)

Implements IInputStream.


The documentation for this class was generated from the following files:
Inheritance diagram for ALimitedInputStream:
Collaboration diagram for ALimitedInputStream: