Interface MOXMAN_Vfs_IFileStream
| Implemented by | MOXMAN_Vfs_Cache_FileStream, MOXMAN_Vfs_Local_FileStream, MOXMAN_Vfs_MemoryFileStream, MOXMAN_Vfs_Memory_FileStream |
|---|
This interface is to be implemented by various file systems to provide access to the binary data of the file.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| close() | Closes the specified stream. This will first flush the stream before closing. | MOXMAN_Vfs_IFileStream |
| flush() | Flush buffered data out to stream. | MOXMAN_Vfs_IFileStream |
| read() | Reads the specified number of bytes and returns an string with data. | MOXMAN_Vfs_IFileStream |
| readToEnd() | Reads all data avaliable in a stream and returns it as a string. | MOXMAN_Vfs_IFileStream |
| skip() | Skip/jump over specified number of bytes from stream. | MOXMAN_Vfs_IFileStream |
| write() | Writes a string to a stream. | MOXMAN_Vfs_IFileStream |
Method Details
Closes the specified stream. This will first flush the stream before closing.
| public abstract void close ( ) |
Flush buffered data out to stream.
| public abstract void flush ( ) |
Reads the specified number of bytes and returns an string with data.
| public abstract string read ( $len = 1024 ) | ||
| $len | int | Number of bytes to read, defaults to 1024. |
| return | string | Data read from stream or null if it's at the end of stream. |
|---|---|---|
Reads all data avaliable in a stream and returns it as a string.
| public abstract string readToEnd ( ) | ||
| return | string | All data read from stream. |
|---|---|---|
Skip/jump over specified number of bytes from stream.
| public abstract int skip ( $bytes ) | ||
| $bytes | int | Number of bytes to skip. |
| return | int | Number of skipped bytes. |
|---|---|---|
Writes a string to a stream.
| public abstract void write ( $buff, $len = -1 ) | ||
| $buff | string | String buffer to write to file. |
| $len | int | Number of bytes from string to write. |