IByteOutput Class Reference
[Data Model]

#include <support/IByteStream.h>

Inheritance diagram for IByteOutput:

IInterface SAtom BnInterface< IByteOutput > BpInterface< IByteOutput > BnByteOutput BBufferIO BByteStream BIOSStream BKernelOStr BNullStream BPipe BStreamDatum::Stream BWindowsOutputStream BWriteOnlyStream List of all members.

Detailed Description

Abstract byte stream output (write) interface.


Public Member Functions

virtual status_t Sync ()=0
 Make sure all data in the stream is written to its physical device.
ssize_t Write (const void *buffer, size_t size, uint32_t flags=0)
 Convenience for writing a vector of one buffer.
virtual ssize_t WriteV (const iovec *vector, ssize_t count, uint32_t flags=0)=0
 Write the bytes described by "iovec" in to the stream.


Member Function Documentation

virtual status_t Sync  )  [pure virtual]
 

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.

Implemented in BStreamDatum::Stream, BBufferIO, BByteStream, BWriteOnlyStream, BIOSStream, BKernelOStr, BMemoryStore, BValueStorage, BNullStream, BPipe, and BWindowsOutputStream.

ssize_t Write const void *  buffer,
size_t  size,
uint32_t  flags = 0
[inline]
 

Convenience for writing a vector of one buffer.

virtual ssize_t WriteV const iovec *  vector,
ssize_t  count,
uint32_t  flags = 0
[pure virtual]
 

Write the bytes described by "iovec" in to the stream.

Returns the number of bytes actually written, or a negative error code. A NULL 'vector' is valid if 'count' is <= 0, in which case count is returned. If 'count' is zero and the B_WRITE_END flag is supplied, the stream is truncated at its current location. Writing to a stream will normally block until all bytes have been written; use B_DO_NOT_BLOCK to allow partial writes.


The documentation for this class was generated from the following file: