BByteStream Class Reference
[Data Model]

#include <support/ByteStream.h>

Inheritance diagram for BByteStream:

BnByteInput BnByteOutput BnByteSeekable BnInterface< IByteInput > BnInterface< IByteOutput > BnInterface< IByteSeekable > IByteInput BBinder IByteOutput BBinder IByteSeekable BBinder IInterface IBinder IInterface IBinder IInterface IBinder SAtom SAtom SAtom SAtom SAtom SAtom BMemoryStore BDatabaseStore BMallocStore BValueStorage BStringIO List of all members.

Detailed Description

Byte streams on top of an IStorage.

Implements IByteInput, IByteOutput, and IByteSeekable on top of a random access IStorage interface.


Public Member Functions

 BByteStream (const sptr< IStorage > &store)
virtual SValue Inspect (const sptr< IBinder > &caller, const SValue &which, uint32_t flags=0)
 Probe binder for interface information.
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)

Protected Member Functions

 BByteStream (IStorage *This)
virtual ~BByteStream ()


Constructor & Destructor Documentation

BByteStream const sptr< IStorage > &  store  ) 
 

BByteStream IStorage This  )  [protected]
 

~BByteStream  )  [protected, virtual]
 


Member Function Documentation

SValue Inspect const sptr< IBinder > &  caller,
const SValue which,
uint32_t  flags = 0
[virtual]
 

Probe binder for interface information.

Return interfaces implemented by this binder object that are requested by which. This is a composition of all interfaces, expressed as { descriptor -> binder } mappings, which are selected through which.

Much more information on Inspect() can be found at Binder Inspect() Details.

Reimplemented from BnInterface< IByteOutput >.

Reimplemented in BMemoryStore.

off_t Position  )  const [virtual]
 

Return the current location in the stream, or a negative error code.

Implements IByteSeekable.

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
[virtual]
 

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.

status_t Sync  )  [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.

Implements IByteOutput.

Reimplemented in BMemoryStore, and BValueStorage.

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


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