Class StreamIo

Description

class StreamIO

This class provides stream input and output operations and supports buffering for write operations. PHP will search for a protocol handler (also known as a wrapper) for schemes in the form of "scheme://...". unless URL-aware fopen wrappers and other wrappers are disabled.

Located in /streamio.class.php (line 21)

Exception
   |
   --PException
      |
      --StreamIo
Variable Summary
mixed $StreamIo
Method Summary
string &Read (fileName $fileName, mode $mode)
string &ReadLength (fileName $fileName, length $length, mode $mode)
string &ReadStream (stream $stream, mode $mode)
string &ReadStreamLength (stream $stream, length $length, mode $mode)
void write (fileName $fileName, data $data)
Variables
mixed $StreamIo (line 23)
  • static:
  • access: private
Methods
GetInstance (line 34)

function GetInstance

This method instantiates a new object from this class; more specifically, it's a singleton instance.

  • return: object instance
  • static:
  • access: public
StreamIo GetInstance ()
Read (line 52)

function Read

This method opens a file and reads all bytes from the file pointer (binary-safe).

  • return: File contents
  • access: public
string &Read (fileName $fileName, mode $mode)
  • fileName $fileName: File to open
  • mode $mode: Type of access
ReadLength (line 79)

function ReadLength

This method opens a file and reads a specific number of bytes from the file pointer (binary-safe).

  • return: File contents
  • access: public
string &ReadLength (fileName $fileName, length $length, mode $mode)
  • fileName $fileName: File to open
  • length $length: Length in bytes
  • mode $mode: Type of access
ReadStream (line 105)

function ReadStream

This method opens a URL and reads all bytes from the file pointer (binary-safe).

  • return: Stream contents
  • access: public
string &ReadStream (stream $stream, mode $mode)
  • stream $stream: Stream to open
  • mode $mode: Type of access
ReadStreamLength (line 132)

function ReadStreamLength

This method opens a URL and reads a specific number of bytes from the file pointer (binary-safe).

  • return: Stream contents
  • access: public
string &ReadStreamLength (stream $stream, length $length, mode $mode)
  • stream $stream: Stream to open
  • length $length: Length in bytes
  • mode $mode: Type of access
write (line 160)

function Write

This method opens a file or URL and writes bytes to the file pointer (binary-safe).

  • access: public
void write (fileName $fileName, data $data)
  • fileName $fileName: Stream to open
  • data $data: Data to write

Inherited Methods

Inherited From PException

PException::Display()

Documentation generated on Thu, 9 Sep 2004 09:03:40 -0400 by phpDocumentor 1.3.0RC3