back to io 

wxInputStream

generated from ../src/mod_io/istream.cpp

wxInputStream is a prototype for input streams. You can't construct it directly. See wxMemoryInputStream, wxFileInputStream and wxFFileInputStream.

Constants

Properties

Name Type Description
c String Returns the first character in the input queue and removes it. When set it puts back the character or full String in the input queue.
eof read only Boolean Returns true when end-of-file occurred.
lastRead read only Integer Returns the last number of bytes read.
peek read only String Returns the first character in the input queue without removing it.

Methods

getC

getC() : String
 

Returns the next character from the input queue and removes it.

peek

peek() : String
 

Returns the next character from the input queue without removing it.

read

read(Buffer) : wxInputStream
 
Name Type Default Description
Buffer Buffer
read(Output) : wxInputStream
 
Name Type Default Description
Output wxOutputStream The outputstream that gets the data from the input queue.

Reads the specified number of bytes (the size of the buffer) and stores them in the buffer.

Reads data from the input queue and stores it in the specified output stream. The data is read until an error is raised by one of the two streams.

seekI

seekI(Offset, 
      Mode = wxSeekMode.FromStart) : Integer
 
Name Type Default Description
Offset Integer Offset to seek to
Mode wxSeekMode wxSeekMode.FromStart

Seeks the offset. Returns the actual position or -1 on error.

ungetch

ungetch(Buffer) : Integer
 
Name Type Default Description
Buffer String
ungetch(Buffer) : Integer
 
Name Type Default Description
Buffer Buffer

This function is only useful in read mode. It is the manager of the "Write-Back" buffer. This buffer acts like a temporary buffer where datas which has to be read during the next read IO call are put. This is useful when you get a big block of data which you didn't want to read: you can replace them at the top of the input queue by this way.

Be very careful about this call in connection with calling seekI on the same stream. Any call to seekI will invalidate any previous call to this method (otherwise you could seekI to one position, "unread" a few bytes there, seekI to another position and data would be either lost or corrupted).



SourceForge.net Logo Support This Project

Table of Contents

Prototype

wxStreamBase

Properties

c
eof
lastRead
peek

Methods

getC
peek
read
seekI
ungetch


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