Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Protected Attributes | Private Member Functions
nsIOFileStream Class Reference

#include <nsFileStream.h>

Collaboration diagram for nsIOFileStream:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { kDefaultMode = (PR_RDWR | PR_CREATE_FILE) }

Public Member Functions

 nsIOFileStream (nsIInputStream *inInputStream, nsIOutputStream *inOutputStream)
 nsIOFileStream (const nsFileSpec &inFile, int nsprMode=kDefaultMode, PRIntn accessMode=00666)
virtual nsresult close ()
nsOutputStream & operator<< (const char *buf)
nsOutputStream & operator<< (char ch)
nsOutputStream & operator<< (short val)
nsOutputStream & operator<< (unsigned short val)
nsOutputStream & operator<< (long val)
nsOutputStream & operator<< (unsigned long val)
nsOutputStream & operator<< (int val)
nsOutputStream & operator<< (unsigned int val)
nsOutputStream & operator<< (nsOutputStream &(*pf)(nsOutputStream &))
nsInputStream & operator>> (char &ch)
nsInputStream & operator>> (nsInputStream &(*pf)(nsInputStream &))
virtual nsresult flush ()

Protected Attributes

nsCOMPtr< nsIFileSpecOutputStreammFileOutputStream

Private Member Functions

 nsIOFileStream (const nsIOFileStream &rhs)
nsIOFileStreamoperator= (const nsIOFileStream &rhs)

Detailed Description

Definition at line 680 of file nsFileStream.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
kDefaultMode 

Definition at line 687 of file nsFileStream.h.


Constructor & Destructor Documentation

nsIOFileStream::nsIOFileStream ( nsIInputStream inInputStream,
nsIOutputStream inOutputStream 
) [inline]

Definition at line 689 of file nsFileStream.h.

                                      :   nsInputFileStream(inInputStream)
                                      ,   nsOutputStream(inOutputStream)
                                      ,   mFileOutputStream(do_QueryInterface(inOutputStream))
                                      {
                                      }
nsIOFileStream::nsIOFileStream ( const nsFileSpec inFile,
int  nsprMode = kDefaultMode,
PRIntn  accessMode = 00666 
) [inline]

Definition at line 697 of file nsFileStream.h.

                                      :  nsInputFileStream((nsIInputStream*)nsnull)
                                      ,  nsOutputStream(nsnull)
                                      {
                                          nsISupports* stream;
                                          if (NS_FAILED(NS_NewIOFileStream(
                                              &stream,
                                              inFile, nsprMode, accessMode)))
                                              return;
                                          mFile = do_QueryInterface(stream);
                                          mStore = do_QueryInterface(stream);
                                          mInputStream = do_QueryInterface(stream);
                                          mOutputStream = do_QueryInterface(stream);
                                          mFileInputStream = do_QueryInterface(stream);
                                          mFileOutputStream = do_QueryInterface(stream);
                                          NS_RELEASE(stream);
                                      }

Here is the call graph for this function:


Member Function Documentation

virtual nsresult nsIOFileStream::close ( void  ) [inline, virtual]

Definition at line 718 of file nsFileStream.h.

                                      {
                                          // Doesn't matter which of the two we close:
                                          // they're hooked up to the same file.
                                          return nsInputFileStream::close();
                                      }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual nsresult nsIOFileStream::flush ( ) [inline, virtual]

Definition at line 751 of file nsFileStream.h.

{if (mFileOutputStream) mFileOutputStream->Flush(); return error(); }

Here is the call graph for this function:

Here is the caller graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( const char *  buf) [inline]

Definition at line 726 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( char  ch) [inline]

Definition at line 728 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( short  val) [inline]

Definition at line 730 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( unsigned short  val) [inline]

Definition at line 732 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( long  val) [inline]

Definition at line 734 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( unsigned long  val) [inline]

Definition at line 736 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( int  val) [inline]

Definition at line 738 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( unsigned int  val) [inline]

Definition at line 740 of file nsFileStream.h.

Here is the call graph for this function:

nsOutputStream& nsIOFileStream::operator<< ( nsOutputStream &(*)(nsOutputStream &)  pf) [inline]

Definition at line 742 of file nsFileStream.h.

Here is the call graph for this function:

nsIOFileStream& nsIOFileStream::operator= ( const nsIOFileStream rhs) [private]
nsInputStream& nsIOFileStream::operator>> ( char &  ch) [inline]

Definition at line 746 of file nsFileStream.h.

Here is the call graph for this function:

nsInputStream& nsIOFileStream::operator>> ( nsInputStream &(*)(nsInputStream &)  pf) [inline]

Definition at line 748 of file nsFileStream.h.

                                         { return nsInputStream::operator >>(pf); }

Here is the call graph for this function:


Member Data Documentation

Definition at line 762 of file nsFileStream.h.


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