1 % -----------------------------------------------------------------------------
3 % -----------------------------------------------------------------------------
4 \section{\class{wxFileOutputStream
}}\label{wxfileoutputstream
}
6 This class represents data written to a file. There are actually
7 two such groups of classes: this one is based on
\helpref{wxFile
}{wxfile
}
8 whereas
\helpref{wxFFileInputStream
}{wxffileinputstream
} is based in
9 the
\helpref{wxFFile
}{wxffile
} class.
11 Note that
\helpref{wxFile
}{wxfile
} and
\helpref{wxFFile
}{wxffile
} differ
12 in one aspect, namely when to
report that the end of the file has been
13 reached. This is documented in
\helpref{wxFile::Eof
}{wxfileeof
} and
14 \helpref{wxFFile::Eof
}{wxffileeof
} and the behaviour of the stream
15 classes reflects this difference, i.e. wxFileInputStream will
report
16 wxSTREAM
\_EOF after having read the last byte whereas wxFFileInputStream
17 will
report wxSTREAM
\_EOF after trying to read
{\it past
} the last byte.
18 Related to EOF behavior, note that
\helpref{SeekO()
}{wxoutputstreamseeko
}
19 can seek beyond the end of the stream (file) and will thus not return
20 {\it wxInvalidOffset
} for that.
22 \wxheading{Derived from
}
24 \helpref{wxOutputStream
}{wxoutputstream
}
26 \wxheading{Include files
}
32 \helpref{wxBufferedOutputStream
}{wxbufferedoutputstream
},
\helpref{wxFileInputStream
}{wxfileinputstream
},
\helpref{wxFFileInputStream
}{wxffileinputstream
}
37 \latexignore{\rtfignore{\wxheading{Members
}}}
39 \membersection{wxFileOutputStream::wxFileOutputStream
}\label{wxfileoutputstreamctor
}
41 \func{}{wxFileOutputStream
}{\param{const wxString\&
}{ ofileName
}}
43 Creates a new file with
{\it ofilename
} name and initializes the stream in
46 \func{}{wxFileOutputStream
}{\param{wxFile\&
}{ file
}}
48 Initializes a file stream in write-only mode using the file I/O object
{\it file
}.
50 \func{}{wxFileOutputStream
}{\param{int
}{ fd
}}
52 Initializes a file stream in write-only mode using the file descriptor
{\it fd
}.
54 \membersection{wxFileOutputStream::
\destruct{wxFileOutputStream
}}\label{wxfileoutputstreamdtor
}
56 \func{}{\destruct{wxFileOutputStream
}}{\void}
60 \membersection{wxFileOutputStream::Ok
}\label{wxfileoutputstreamok
}
62 \constfunc{bool
}{Ok
}{\void}
64 Returns true if the stream is initialized and ready.