InputStream

InputStream is the interface for readable streams.

Members

Functions

getc
char getc()

Read and return the next character in the stream.

getcw
wchar getcw()
Undocumented in source.
opApply
int opApply(int delegate(ref char[] line) dg)

Overload foreach statements to read the stream line by line and call the supplied delegate with each line or with each line with line number.

opApply
int opApply(int delegate(ref ulong n, ref char[] line) dg)
Undocumented in source.
opApply
int opApply(int delegate(ref wchar[] line) dg)
Undocumented in source.
opApply
int opApply(int delegate(ref ulong n, ref wchar[] line) dg)
Undocumented in source.
read
size_t read(ubyte[] buffer)

Read a block of data big enough to fill the given array buffer.

read
void read(byte x)

Read a basic type or counted string.

read
void read(ubyte x)
Undocumented in source.
read
void read(short x)
Undocumented in source.
read
void read(ushort x)
Undocumented in source.
read
void read(int x)
Undocumented in source.
read
void read(uint x)
Undocumented in source.
read
void read(long x)
Undocumented in source.
read
void read(ulong x)
Undocumented in source.
read
void read(float x)
Undocumented in source.
read
void read(double x)
Undocumented in source.
read
void read(real x)
Undocumented in source.
read
void read(ifloat x)
Undocumented in source.
read
void read(idouble x)
Undocumented in source.
read
void read(ireal x)
Undocumented in source.
read
void read(cfloat x)
Undocumented in source.
read
void read(cdouble x)
Undocumented in source.
read
void read(creal x)
Undocumented in source.
read
void read(char x)
Undocumented in source.
read
void read(wchar x)
Undocumented in source.
read
void read(dchar x)
Undocumented in source.
read
void read(char[] s)
Undocumented in source.
read
void read(wchar[] s)
Undocumented in source.
readExact
void readExact(void* buffer, size_t size)

Read exactly size bytes into the buffer.

readLine
char[] readLine()

Read a line that is terminated with some combination of carriage return and line feed or end-of-file.

readLine
char[] readLine(char[] result)
Undocumented in source.
readLineW
wchar[] readLineW()
Undocumented in source.
readLineW
wchar[] readLineW(wchar[] result)
Undocumented in source.
readString
char[] readString(size_t length)

Read a string of the given length, throwing ReadException if there was a problem.

readStringW
wchar[] readStringW(size_t length)

Read a string of the given length, throwing ReadException if there was a problem.

readf
int readf(...)
Undocumented in source.
ungetc
char ungetc(char c)

Push a character back onto the stream.

ungetcw
wchar ungetcw(wchar c)
Undocumented in source.
vreadf
int vreadf(TypeInfo[] arguments, va_list args)

Scan a string from the input using a similar form to C's scanf and <a href="std_format.html">std.format</a>.

Properties

available
size_t available [@property getter]

Retrieve the number of bytes available for immediate reading.

eof
bool eof [@property getter]

Return whether the current file position is the same as the end of the file.

isOpen
bool isOpen [@property getter]
Undocumented in source.

Meta