GenericStream
extends Stream
in package
Table of Contents
Constants
- CURRENT = SEEK_CUR
- END = SEEK_END
- READABLE = ['r', 'rb', 'r+', 'r+b', 'w+', 'w+b', 'a+', 'a+b', 'x+', 'x+b', 'c+', 'c+b']
- START = SEEK_SET
- WRITEABLE = ['r+', 'r+b', 'w', 'wb', 'w+', 'w+b', 'a', 'ab', 'a+', 'a+b', 'x', 'xb', 'x+', 'x+b', 'c', 'cb', 'c+', 'c+b']
Methods
- __construct() : mixed
- __destruct() : mixed
- __toString() : string
- canRead() : bool
- canSeek() : bool
- canWrite() : bool
- close() : void
- Free, release or reset unmanaged resources.
- copyTo() : void
- flush() : void
- getLength() : int
- getPosition() : int
- getResource() : mixed
- hasTimedOut() : bool
- isBlocking() : bool
- isEnded() : bool
- read() : string|null
- readByte() : int
- readChar() : string|null
- readLine() : string|null
- seek() : int
- setLength() : void
- write() : void
- writeByte() : void
- writeChar() : void
- writeLine() : void
Constants
CURRENT
public
mixed
CURRENT
= SEEK_CUR
END
public
mixed
END
= SEEK_END
READABLE
public
mixed
READABLE
= ['r', 'rb', 'r+', 'r+b', 'w+', 'w+b', 'a+', 'a+b', 'x+', 'x+b', 'c+', 'c+b']
START
public
mixed
START
= SEEK_SET
WRITEABLE
public
mixed
WRITEABLE
= ['r+', 'r+b', 'w', 'wb', 'w+', 'w+b', 'a', 'ab', 'a+', 'a+b', 'x', 'xb', 'x+', 'x+b', 'c', 'cb', 'c+', 'c+b']
Methods
__construct()
public
__construct(mixed $stream) : mixed
Parameters
- $stream : mixed
__destruct()
public
__destruct() : mixed
__toString()
public
__toString() : string
Return values
stringcanRead()
public
canRead() : bool
Return values
boolcanSeek()
public
canSeek() : bool
Return values
boolcanWrite()
public
canWrite() : bool
Return values
boolclose()
Free, release or reset unmanaged resources.
public
close() : void
copyTo()
public
copyTo(Stream $other) : void
Parameters
- $other : Stream
flush()
public
flush() : void
getLength()
public
getLength() : int
Return values
intgetPosition()
public
getPosition() : int
Return values
intgetResource()
public
getResource() : mixed
hasTimedOut()
public
hasTimedOut() : bool
Return values
boolisBlocking()
public
isBlocking() : bool
Return values
boolisEnded()
public
isEnded() : bool
Return values
boolread()
public
read(int $length) : string|null
Parameters
- $length : int
Return values
string|nullreadByte()
public
readByte() : int
Return values
intreadChar()
public
readChar() : string|null
Return values
string|nullreadLine()
public
readLine() : string|null
Return values
string|nullseek()
public
seek(int $offset[, int $origin = Stream::START ]) : int
Parameters
- $offset : int
- $origin : int = Stream::START
Return values
intsetLength()
public
setLength(int $length) : void
Parameters
- $length : int
write()
public
write(string $buffer[, int $length = -1 ]) : void
Parameters
- $buffer : string
- $length : int = -1
writeByte()
public
writeByte(int $byte) : void
Parameters
- $byte : int
writeChar()
public
writeChar(string $char) : void
Parameters
- $char : string
writeLine()
public
writeLine(string $line) : void
Parameters
- $line : string