back to io 

wxFileInputStream

generated from ../src/mod_io/fistream.cpp

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 on the wxFFile class. An example:


   var fis = new wxFileInputStream("c:\\temp\\test.txt");
   if ( fis.ok )
   {
     var bis = new wxBufferedInputStream(fis);
     while(! bis.eof )
     {
       var buffer = new Buffer(100);
       bis.read(buffer);
       if ( bis.lastRead != -1 )
       {
         buffer.size = bis.lastRead;
         print(bis.lastRead, ' - ', buffer.size, '-$', buffer.toString(), "$\n");
       }
     }
   }

Constants

Constructor

wxFileInputStream

wxFileInputStream(FileName)
 
Name Type Default Description
FileName String The name of a file
wxFileInputStream(File)
 
Name Type Default Description
File wxFile
wxFileInputStream(Fd)
 
Name Type Default Description
Fd Integer A file descriptor

Constructs a new wxFileInputStream object. A wxFileInputStream is always opened in read-only mode.



SourceForge.net Logo Support This Project

Table of Contents

Prototype

wxInputStream

Constructor

wxFileInputStream


Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.