Project:dool
Class List Class Hierarchy
Summary: Ctors Methods

Module dool.io.Stream

Class Stream

Implemented interfaces:
InputStream
class Stream



Constructor Summary
()
          

Methods Summary
abstract uint readBlock(void* buffer, uint size)
          
void readExact(void* buffer, uint size)
          
uint read(ubyte buffer)
          
void read(byte x)
          
void read(ubyte x)
          
void read(short x)
          
void read(ushort x)
          
void read(int x)
          
void read(uint x)
          
void read(long x)
          
void read(ulong x)
          
void read(float x)
          
void read(double x)
          
void read(real x)
          
void read(ireal x)
          
void read(creal x)
          
void read(char x)
          
void read(wchar x)
          
void read(char s)
          
void read(wchar s)
          
char readLine()
          
char readLine(char result)
          
wchar readLineW()
          
wchar readLineW(wchar result)
          
char readString(uint length)
          
wchar readStringW(uint length)
          
char getc()
          
wchar getcw()
          
char ungetc(char c)
          
wchar ungetcw(wchar c)
          
int vscanf(char fmt, c_va_list args)
          
int scanf(char format, ... )
          
uint available()
          
abstract uint writeBlock(void* buffer, uint size)
          
void writeExact(void* buffer, uint size)
          
uint write(ubyte buffer)
          
void write(byte x)
          
void write(ubyte x)
          
void write(short x)
          
void write(ushort x)
          
void write(int x)
          
void write(uint x)
          
void write(long x)
          
void write(ulong x)
          
void write(float x)
          
void write(double x)
          
void write(real x)
          
void write(ireal x)
          
void write(creal x)
          
void write(char x)
          
void write(wchar x)
          
void write(char s)
          
void write(wchar s)
          
void writeLine(char s)
          
void writeLineW(wchar s)
          
void writeString(char s)
          
void writeStringW(wchar s)
          
uint vprintf(char format, c_va_list args)
          
uint printf(char format, ... )
          
protected void doFormatCallback(dchar c)
          
void writef(... )
          
void writefln(... )
          
void copyFrom(Stream s)
          
void copyFrom(Stream s, uint count)
          
abstract ulong seek(long offset, SeekPos whence)
          
ulong seekSet(long offset)
          
ulong seekCur(long offset)
          
ulong seekEnd(long offset)
          
void position(ulong pos)
          
ulong position()
          
ulong size()
          
bit eof()
          
public bit isOpen()
          
void flush()
          
void close()
          
override char toString()
          
override uint toHash()
          
public bit iswhite(char c)
          
public bit isdigit(char c)
          
public bit isoctdigit(char c)
          
public bit ishexdigit(char c)
          


this ()

abstract uint readBlock(void* buffer, uint size)
//reads block of data of specified size, //returns actual number of bytes read
void readExact(void* buffer, uint size)
//reads block of data of specified size, //throws ReadException on error
uint read(ubyte[] buffer)
//reads block of data big enough to fill the given //array, returns actual number of bytes read
void read(out byte x)
//read a single value of desired type, //throw ReadException on error
void read(out ubyte x)

void read(out short x)

void read(out ushort x)

void read(out int x)

void read(out uint x)

void read(out long x)

void read(out ulong x)

void read(out float x)

void read(out double x)

void read(out real x)

void read(out ireal x)

void read(out creal x)

void read(out char x)

void read(out wchar x)

void read(out char[] s)
//reads a string, written earlier by write()
void read(out wchar[] s)
//reads a Unicode string, written earlier by write()
char [] readLine()
//reads a line, terminated by either CR, LF, CR/LF, or EOF
char [] readLine(char[] result)
//reads a line, terminated by either CR, LF, CR/LF, or EOF //reusing the memory in buffer if result will fit and otherwise //allocates a new string
wchar [] readLineW()
//reads a Unicode line, terminated by either CR, LF, CR/LF, //or EOF; pretty much the same as the above, working with //wchars rather than chars
wchar [] readLineW(wchar[] result)
//reads a Unicode line, terminated by either CR, LF, CR/LF, //or EOF; //fills supplied buffer if line fits and otherwise allocates a new string.
char [] readString(uint length)
//reads a string of given length, throws //ReadException on error
wchar [] readStringW(uint length)
//reads a Unicode string of given length, throws //ReadException on error
char getc()
//reads and returns next character from the stream, //handles characters pushed back by ungetc()
wchar getcw()
//reads and returns next Unicode character from the //stream, handles characters pushed back by ungetc()
char ungetc(char c)
//pushes back character c into the stream; only has //effect on further calls to getc() and getcw()
wchar ungetcw(wchar c)
//pushes back Unicode character c into the stream; only //has effect on further calls to getc() and getcw()
int vscanf(char[] fmt, c_va_list args)

int scanf(char[] format, ...)

uint available()
//returns estimated number of bytes available for immediate reading
abstract uint writeBlock(void* buffer, uint size)
//writes block of data of specified size, //returns actual number of bytes written
void writeExact(void* buffer, uint size)
//writes block of data of specified size, //throws WriteException on error
uint write(ubyte[] buffer)
//writes the given array of bytes, returns //actual number of bytes written
void write(byte x)
//write a single value of desired type, //throw WriteException on error
void write(ubyte x)

void write(short x)

void write(ushort x)

void write(int x)

void write(uint x)

void write(long x)

void write(ulong x)

void write(float x)

void write(double x)

void write(real x)

void write(ireal x)

void write(creal x)

void write(char x)

void write(wchar x)

void write(char[] s)
//writes a string, together with its length
void write(wchar[] s)
//writes a Unicode string, together with its length
void writeLine(char[] s)
//writes a line, throws WriteException on error
void writeLineW(wchar[] s)
//writes a UNICODE line, throws WriteException on error
void writeString(char[] s)
//writes a string, throws WriteException on error
void writeStringW(wchar[] s)
//writes a UNICODE string, throws WriteException on error
uint vprintf(char[] format, c_va_list args)
//writes data to stream using vprintf() syntax, //returns number of bytes written
uint printf(char[] format, ...)
//writes data to stream using printf() syntax, //returns number of bytes written
protected void doFormatCallback(dchar c)

void writef(...)
//writes data to stream using writef() syntax,
void writefln(...)
//writes data with trailing newline
void copyFrom(Stream s)
//copies all data from given stream into this one, //may throw ReadException or WriteException on failure
void copyFrom(Stream s, uint count)
//copies specified number of bytes from given stream into //this one, may throw ReadException or WriteException on failure
abstract ulong seek(long offset, SeekPos whence)
//moves pointer to given position, relative to beginning of stream, //end of stream, or current position, returns new position
ulong seekSet(long offset)
//seek from the beginning of the stream.
ulong seekCur(long offset)
//seek from the current point in the stream.
ulong seekEnd(long offset)
//seek from the end of the stream.
void position(ulong pos)
//sets position
ulong position()
//returns current position
ulong size()
//returns size of stream
bit eof()
//returns true if end of stream is reached, false otherwise
public bit isOpen()
//returns true if the stream is open
void flush()
//flush the buffer if writeable
void close()
//close the stream somehow; the default just flushes the buffer
override char [] toString()
//creates a string in memory containing copy of stream data
override uint toHash()
//calculates CRC-32 of data in stream
public bit iswhite(char c)
//helper functions
public bit isdigit(char c)

public bit isoctdigit(char c)

public bit ishexdigit(char c)