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

Class: Swift_ByteStream_FileByteStream

Source Location: /system/vendor/swiftmailer/swiftmailer/lib/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


Child classes:

Inherited Variables

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 16]
Allows reading and writing of bytes to and from a file.



Tags:

author:  Chris Corbyn


[ Top ]


Class Methods


constructor __construct [line 45]

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

Create a new FileByteStream for $path.



Tags:

access:  public


Overridden in child classes as:

Swift_ByteStream_TemporaryFileByteStream::__construct()

Parameters:

string   $path  
bool   $writable   if true

[ Top ]

method getPath [line 63]

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 82]

string|bool 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.

Parameters:

int   $length  

[ Top ]

method setReadPointer [line 118]

bool 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 127]

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 134]

void _flush( )

Not used



Tags:

access:  protected


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

[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:48:49 +0000 by phpDocumentor 1.4.3