SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Implementation of a simple lock stream that is used with a binary input stream. More...
#include <rw/stream/RWSynchronizedByteInputStreamImp.h>
Public Member Functions | |
virtual RWSize | readUntil (RWByte *byteArray, RWSize maxSize, RWByte delim) |
Public Member Functions inherited from RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp > | |
virtual | ~RWTInputStreamLockImp () |
virtual RWByteInputStream | acquire (void) |
virtual RWSize | available (void) const |
virtual void | close (void) |
virtual bool | isBad (void) const |
virtual bool | isEof (void) const |
virtual bool | isFail (void) const |
virtual bool | isGood (void) const |
virtual RWSize | read (element_type *array, RWSize num) |
virtual element_type | read (void) |
virtual void | release (void) |
virtual RWSize | skip (RWSize numUnits) |
Public Member Functions inherited from RWFilteredByteInputStreamImp | |
virtual | ~RWFilteredByteInputStreamImp () |
Public Member Functions inherited from RWByteInputStreamImp | |
virtual | ~RWByteInputStreamImp () |
Public Member Functions inherited from RWInputStreamImp | |
virtual | ~RWInputStreamImp () |
Public Member Functions inherited from RWStreamImp | |
virtual | ~RWStreamImp () |
Static Public Member Functions | |
static RWByteInputStream | make (const RWByteInputStream &sourceStream) |
Static Public Member Functions inherited from RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp > | |
static RWByteInputStream | make (const RWByteInputStream &sourceStream) |
Additional Inherited Members | |
Public Types inherited from RWTInputStreamLockImp< RWByteInputStream, RWFilteredByteInputStreamImp > | |
typedef RWByteInputStream::element_type | element_type |
typedef RWByteInputStream | RWInputStream_type |
Protected Types inherited from RWTCountingBody< RWMutexLock > | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
Protected Types inherited from RWTMonitor< RWMutexLock > | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
Class RWSynchronizedByteInputStreamImp implements a simple lock stream that is used with binary input stream. The stream locks its internal synchronization mechanism before forwarding input requests to its associated source stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.
|
protected |
Initializes the reference to the input stream that will be used as the source of bytes.
sourceStream | The input stream that will serve as the source of bytes. |
|
inlinestatic |
Constructs an RWSynchronizedByteInputStreamImp instance that uses sourceStream as the source of bytes, and returns a handle to it. Throws no exceptions.
sourceStream | The output stream that will serve as the source of bytes. |
|
virtual |
Reads bytes from the attached source stream until the last byte read is equal to delim, or maxSize bytes have been read, or the end of the input sequence is reached. The bytes read are stored in byteArray. The function returns the actual number of bytes read from the stream.
byteArray | A pointer to the array receiving the byte(s) extracted from the stream. |
maxSize | The maximum number of byte(s) to be read. |
delim | The byte value used as a delimiter. |
Reimplemented from RWFilteredByteInputStreamImp.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |