Zymba Documentation
IO.Stream
Text
object @IO.Stream(@Base) {
MODE_READ;
MODE_WRITE;
canRead(): bool {}
canSeek(): bool {}
canWrite(): bool {}
close() {}
copyTo(@IO.Stream $stream, ?int $length): int {}
disableBlocking(): $this {}
echo(?int $length): int {}
echoAll(): int {}
echoLine(): int {}
enableBlocking(): $this {}
exit() {}
flush(): $this {}
getPosition(): int {}
getURI(): string {}
hasMore(): bool {}
hasTimedOut(): bool {}
isBlocking(): bool {}
isLocal(): bool {}
next(): object {}
overwrite(string $string): int {}
pollExceptional(): bool {}
pollRead(): bool {}
pollWrite(): bool {}
read(?int $length): string {}
readAll(): string {}
readLine(): string {}
readLineCSV(string $delimiter): object {}
reset(): $this {}
seek(int $position): $this {}
seekEnd(): $this {}
setReadBuffer(int $size): $this {}
setTimeout(int $timeout): $this {}
setWriteBuffer(int $size): $this {}
skip(int $offset): $this {}
toString(): string {}
truncate(int $size): $this {}
write(string $string, ?int $length): int {}
writeFormatted(string $format, ...$arguments): int {}
writeLine(string $string): int {}
writeLineCSV(object $array, string $delimiter): int {}
}
Abstract IO stream prototype.
Prototype
Methods
Closes this stream and frees its associated resources.
CODE
$this.close(): void
Outputs the content of this stream as far as and including the next end-of-line sequence and returns the number of bytes outputted.
CODE
$this.echoLine(): int
Returns
| Type | Value |
|---|---|
int |
Closes this stream and frees its associated resources for the purpose of contextualization.
CODE
$this.exit(): void
Gets the current position within this stream as the number of bytes from its beginning.
CODE
$this.getPosition(): int
Returns
| Type | Value |
|---|---|
int |
Determines whether this stream is in blocking mode.
CODE
$this.isBlocking(): bool
Returns
| Type | Value |
|---|---|
bool |
Reads the content of this stream as far as and including the next end-of-line sequence for the purpose of iteration.
CODE
$this.next(): object
Returns
| Type | Value |
|---|---|
object | [position: line] |
null |
Reads the content of this stream as far as and including the next end-of-line sequence.
CODE
$this.readLine(): string
Returns
| Type | Value |
|---|---|
string | |
null |
Converts this stream to a string by returning its associated URI.
CODE
$this.toString(): string
Returns
| Type | Value |
|---|---|
string |