Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_ByteStream_FileByteStream

Source Location: /vendors/swift/classes/Swift/ByteStream/FileByteStream.php

Class Overview

Swift_ByteStream_AbstractFilterableInputStream
   |
   --Swift_ByteStream_FileByteStream

Allows reading and writing of bytes to and from a file.


Author(s):

  • Chris Corbyn

Implements interfaces:

Methods


Inherited Methods

Class: Swift_ByteStream_AbstractFilterableInputStream

Swift_ByteStream_AbstractFilterableInputStream::addFilter()
Add a StreamFilter to this InputByteStream.
Swift_ByteStream_AbstractFilterableInputStream::bind()
Attach $is to this stream.
Swift_ByteStream_AbstractFilterableInputStream::commit()
For any bytes that are currently buffered inside the stream, force them off the buffer.
Swift_ByteStream_AbstractFilterableInputStream::flushBuffers()
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
Swift_ByteStream_AbstractFilterableInputStream::removeFilter()
Remove an already present StreamFilter based on its $key.
Swift_ByteStream_AbstractFilterableInputStream::unbind()
Remove an already bound stream.
Swift_ByteStream_AbstractFilterableInputStream::write()
Writes $bytes to the end of the stream.
Swift_ByteStream_AbstractFilterableInputStream::_commit()
Commit the given bytes to the storage medium immediately.
Swift_ByteStream_AbstractFilterableInputStream::_flush()
Flush any buffers/content with immediate effect.

Class Details

[line 22]
Allows reading and writing of bytes to and from a file.



Tags:

author:  Chris Corbyn
filesource:  Source Code for this file


[ Top ]


Class Methods


constructor __construct [line 50]

Swift_ByteStream_FileByteStream __construct( string $path, [string $writable = false])

Create a new FileByteStream for $path.



Tags:

access:  public


Parameters:

string   $path  
string   $writable   if true

[ Top ]

method getPath [line 61]

string getPath( )

Get the complete path to the file.



Tags:

access:  public



Implementation of:
Swift_FileStream::getPath()
Get the complete path to the file.
[ Top ]

method read [line 75]

string read( int $length)

Reads $length bytes from the stream into a string and moves the pointer through the stream by $length. If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.



Tags:

throws:  Swift_IoException
access:  public



Implementation of:
Swift_OutputByteStream::read()
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length. If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.

Parameters:

int   $length  

[ Top ]

method setReadPointer [line 103]

boolean setReadPointer( int $byteOffset)

Move the internal read pointer to $byteOffset in the stream.



Tags:

access:  public



Implementation of:
Swift_OutputByteStream::setReadPointer()
Move the internal read pointer to $byteOffset in the stream.

Parameters:

int   $byteOffset  

[ Top ]

method _commit [line 115]

void _commit( $bytes)

Just write the bytes to the file



Tags:

access:  protected


Overrides Swift_ByteStream_AbstractFilterableInputStream::_commit() (Commit the given bytes to the storage medium immediately.)

Parameters:

   $bytes  

[ Top ]

method _flush [line 122]

void _flush( )

Not used



Tags:

access:  protected


Overrides Swift_ByteStream_AbstractFilterableInputStream::_flush() (Flush any buffers/content with immediate effect.)

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:33:21 -0500 by phpDocumentor 1.4.3