MemoryStream
extends GenericStream
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
- fromString() : MemoryStream
- 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
__destruct()
public
__destruct() : mixed
__toString()
public
__toString() : string
Return values
stringcanRead()
public
abstract canRead() : bool
Return values
boolcanSeek()
public
abstract canSeek() : bool
Return values
boolcanWrite()
public
abstract canWrite() : bool
Return values
boolclose()
Free, release or reset unmanaged resources.
public
abstract close() : void
copyTo()
public
copyTo(Stream $other) : void
Parameters
- $other : Stream
flush()
public
abstract flush() : void
fromString()
public
static fromString(string $string) : MemoryStream
Parameters
- $string : string
Return values
MemoryStreamgetLength()
public
abstract getLength() : int
Return values
intgetPosition()
public
abstract getPosition() : int
Return values
intgetResource()
public
getResource() : mixed
hasTimedOut()
public
abstract hasTimedOut() : bool
Return values
boolisBlocking()
public
abstract isBlocking() : bool
Return values
boolisEnded()
public
abstract isEnded() : bool
Return values
boolread()
public
abstract read(int $length) : string|null
Parameters
- $length : int
Return values
string|nullreadByte()
public
readByte() : int
Return values
intreadChar()
public
abstract readChar() : string|null
Return values
string|nullreadLine()
public
abstract readLine() : string|null
Return values
string|nullseek()
public
abstract seek(int $offset[, int $origin = self::START ]) : int
Parameters
- $offset : int
- $origin : int = self::START
Return values
intsetLength()
public
abstract setLength(int $length) : void
Parameters
- $length : int
write()
public
abstract write(string $buffer[, int $length = -1 ]) : void
Parameters
- $buffer : string
- $length : int = -1
writeByte()
public
writeByte(int $byte) : void
Parameters
- $byte : int
writeChar()
public
abstract writeChar(string $char) : void
Parameters
- $char : string
writeLine()
public
writeLine(string $line) : void
Parameters
- $line : string