class JBuffer


Located at : UKNOWVA_ROOT/libraries/joomla/utilities/buffer.php

Generic Buffer stream handler

This class provides a generic buffer stream. It can be used to store/retrieve/manipulate string buffers with the standard PHP filesystem I/O methods.

Properties

integer $position Stream position
string $name Buffer name
array $_buffers Buffer hash

Methods

boolean
stream_open(string $path, string $mode, integer $options, string $opened_path)

Function to open file or url

mixed
stream_read(integer $count)

Read stream

integer
stream_write(string $data)

Write stream

integer
stream_tell()

Function to get the current position of the stream

boolean
stream_eof()

Function to test for end of file pointer

boolean
stream_seek(integer $offset, integer $whence)

The read write position updates in response to $offset and $whence

Details

at line 61
boolean stream_open(string $path, string $mode, integer $options, string $opened_path)

Function to open file or url

Parameters

string $path The URL that was passed
string $mode Mode used to open the file see fopen
integer $options Flags used by the API, may be STREAMUSEPATH and STREAMREPORTERRORS
string $opened_path Full path of the resource. Used with STREANUSEPATH option

Return Value

boolean

See also

streamWrapper::stream_open

at line 82
mixed stream_read(integer $count)

Read stream

Parameters

integer $count How many bytes of data from the current position should be returned.

Return Value

mixed The data from the stream up to the specified number of bytes (all data if the total number of bytes in the stream is less than $count. Null if the stream is empty.

See also

streamWrapper::stream_read

at line 99
integer stream_write(string $data)

Write stream

Parameters

string $data

Return Value

integer

See also

streamWrapper::stream_write

at line 118
integer stream_tell()

Function to get the current position of the stream

Return Value

integer

See also

streamWrapper::stream_tell

at line 130
boolean stream_eof()

Function to test for end of file pointer

Return Value

boolean True if the pointer is at the end of the stream

See also

streamWrapper::stream_eof

at line 146
boolean stream_seek(integer $offset, integer $whence)

The read write position updates in response to $offset and $whence

Parameters

integer $offset The offset in bytes
integer $whence Position the offset is added to Options are SEEKSET, SEEKCUR, and SEEK_END

Return Value

boolean True if updated

See also

streamWrapper::stream_seek