SkFDStream Class Reference

#include <SkStream.h>

Inherits SkStream.

Collaboration diagram for SkFDStream:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SkFDStream (int fileDesc, bool closeWhenDone)
virtual ~SkFDStream ()
bool isValid () const
virtual bool rewind ()
virtual size_t read (void *buffer, size_t size)
virtual const char * getFileName ()

Detailed Description

A stream that reads from a file descriptor

Definition at line 140 of file SkStream.h.


Constructor & Destructor Documentation

SkFDStream::SkFDStream ( int  fileDesc,
bool  closeWhenDone 
)

Initialize the stream with a dup() of the specified file descriptor. If closeWhenDone is true, then the descriptor will be closed in the destructor.

virtual SkFDStream::~SkFDStream (  )  [virtual]

Member Function Documentation

virtual const char* SkFDStream::getFileName (  )  [inline, virtual]

If this stream represents a file, this method returns the file's name. If it does not, it returns NULL (the default behavior).

Reimplemented from SkStream.

Definition at line 155 of file SkStream.h.

bool SkFDStream::isValid (  )  const [inline]

Returns true if the current path could be opened.

Definition at line 151 of file SkStream.h.

virtual size_t SkFDStream::read ( void *  buffer,
size_t  size 
) [virtual]

Called to read or skip size number of bytes. If buffer is NULL and size > 0, skip that many bytes, returning how many were skipped. If buffer is NULL and size == 0, return the total length of the stream. If buffer != NULL, copy the requested number of bytes into buffer, returning how many were copied.

Parameters:
buffer If buffer is NULL, ignore and just skip size bytes, otherwise copy size bytes into buffer
size The number of bytes to skip or copy
Returns:
bytes read on success

Implements SkStream.

virtual bool SkFDStream::rewind (  )  [virtual]

Called to rewind to the beginning of the stream. If this cannot be done, return false.

Implements SkStream.


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

Generated on Tue Oct 20 11:03:42 2009 for Skia by  doxygen 1.6.1