## wxFileInputStream

This class represents data read in from a file. There are actually two such groups of classes: this one is based on wxFile whereas wxFFileInputStream is based in the wxFFile class.

Note that wxFile and wxFFile differ in one aspect, namely when to report that the end of the file has been reached. This is documented in wxFile::Eof and wxFFile::Eof and the behaviour of the stream classes reflects this difference, i.e. wxFileInputStream will report wxSTREAM_EOF after having read the last byte whereas wxFFileInputStream will report wxSTREAM_EOF after trying to read past the last byte.

Derived from

wxInputStream

Include files

<wx/wfstream.h>

See also

wxBufferedInputStream, wxFileOutputStream, wxFFileOutputStream

Members

wxFileInputStream::wxFileInputStream
wxFileInputStream::~wxFileInputStream
wxFileInputStream::Ok

### wxFileInputStream::wxFileInputStream

wxFileInputStream(const wxString& ifileName)

Opens the specified file using its ifilename name in read-only mode.

wxFileInputStream(wxFile& file)

Initializes a file stream in read-only mode using the file I/O object file.

wxFileInputStream(int fd)

Initializes a file stream in read-only mode using the specified file descriptor.

### wxFileInputStream::~wxFileInputStream

~wxFileInputStream()

Destructor.

### wxFileInputStream::Ok

bool Ok() const

Returns TRUE if the stream is initialized and ready.