#include <support/BufferIO.h>
Inheritance diagram for BBufferIO:

Instantiante this class, pointing to an existing byte stream (IByteInput, IByteOutput, and IByteSeekable interfaces). This gives you a new byte stream that performs buffering of reads/writes before calling to the real stream.
Public Member Functions | |
| BBufferIO (const sptr< IByteInput > &inStream, const sptr< IByteOutput > &outStream, const sptr< IByteSeekable > &seeker, size_t buf_size=DEFAULT_BUF_SIZE) | |
| status_t | Flush () |
| virtual off_t | Position () const |
| Return the current location in the stream, or a negative error code. | |
| virtual ssize_t | ReadV (const struct iovec *vector, ssize_t count, uint32_t flags=0) |
| virtual off_t | Seek (off_t position, uint32_t seek_mode) |
| Move to a new location in the stream. | |
| virtual status_t | Sync () |
| Make sure all data in the stream is written to its physical device. | |
| virtual ssize_t | WriteV (const struct iovec *vector, ssize_t count, uint32_t flags=0) |
| virtual | ~BBufferIO () |
Protected Member Functions | |
| BBufferIO (size_t buf_size=DEFAULT_BUF_SIZE) | |
|
||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Return the current location in the stream, or a negative error code.
Implements IByteSeekable. |
|
||||||||||||||||
|
|
|
||||||||||||
|
Move to a new location in the stream. The seek_mode can be either SEEK_SET, SEEK_END, or SEEK_CUR. Returns the new location, or a negative error code. Implements IByteSeekable. |
|
|
Make sure all data in the stream is written to its physical device. Returns B_OK if the data is safely stored away, else an error code. Implements IByteOutput. |
|
||||||||||||||||
|
|