Base Framework
|
Input stream. More...
#include <base/io/InputStream.h>
Inherits Stream.
Inherited by FileDescriptorInputStream [virtual]
, FileInputStream, FilterInputStream [virtual]
, MemoryInputStream, Pipe [virtual]
, RandomInputStream, StreamSocket [virtual]
, and StringInputStream.
Public Member Functions | |
virtual unsigned int | available () const =0 |
virtual unsigned int | read (uint8 *buffer, unsigned int size, bool nonblocking)=0 |
virtual unsigned int | skip (unsigned int count)=0 |
virtual void | wait () const =0 |
virtual bool | wait (unsigned int timeout) const =0 |
![]() | |
virtual void | close ()=0 |
virtual | ~Stream () noexcept(false) |
![]() | |
ReferenceCountedObject () noexcept | |
ReferenceCountedObject (const ReferenceCountedObject ©) noexcept | |
ReferenceCountedObject (ReferenceCountedObject &&move) noexcept | |
ReferenceCountedObject & | operator= (const ReferenceCountedObject ©) noexcept |
ReferenceCountedObject & | operator= (ReferenceCountedObject &&move) noexcept |
MemorySize | getNumberOfReferences_INTERNAL () const noexcept |
virtual bool | useGarbageCollector () const noexcept |
![]() | |
DynamicObject () noexcept | |
bool | isValidObject () const noexcept |
virtual | ~DynamicObject () noexcept(false) |
_COM_AZURE_DEV__BASE__OVERRIDE_ALLOC () | |
Input stream.
Class representing an input stream of bytes.
|
pure virtual |
Returns the number of bytes that can be read or skipped over without blocking under normal circumstances. The number of returned bytes may be less than the true number of bytes available. Attempting to read the number of bytes returned by the function may block the calling thread if some process has acquired a lock on the object (e.g. file locking).
Implemented in RandomInputStream, MemoryInputStream, StreamSocket, BufferedInputStream, FormatInputStream, FileDescriptorInputStream, Pipe, FileInputStream, StringInputStream, and FilterInputStream.
|
pure virtual |
Fills the specified buffer with bytes from the stream. In blocking mode the method does not return until all bytes have been read. In non-blocking mode the total bytes read may be any number below or equal to the requested number of bytes. Attempting to read beyond the end of a stream in blocking mode results in an EndOfFile exception.
buffer | The buffer to receive the bytes. |
size | The size of the buffer. |
nonblocking | Specifies that the method may not block. |
Implemented in MemoryInputStream, StreamSocket, FormatInputStream, BufferedInputStream, FileDescriptorInputStream, Pipe, FilterInputStream, FileInputStream, StringInputStream, and RandomInputStream.
|
pure virtual |
Skips a specified number of bytes. Blocks if asked to skip more bytes than available.
count | The number of bytes to skip. |
Implemented in RandomInputStream, MemoryInputStream, StreamSocket, BufferedInputStream, FileDescriptorInputStream, FilterInputStream, StringInputStream, Pipe, and FileInputStream.
|
pure virtual |
Blocking wait for input to become available.
Implemented in RandomInputStream, MemoryInputStream, StreamSocket, BufferedInputStream, FileDescriptorInputStream, Pipe, FilterInputStream, and FileInputStream.
|
pure virtual |
Blocking wait for input to become available.
timeout | The timeout periode in microseconds. |
Implemented in RandomInputStream, MemoryInputStream, StreamSocket, BufferedInputStream, FileDescriptorInputStream, Pipe, FilterInputStream, and FileInputStream.