8 * This source file is subject to the new BSD license that is bundled
9 * with this package in the file LICENSE.txt.
10 * It is also available through the world-wide-web at this URL:
11 * http://framework.zend.com/license/new-bsd
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@zend.com so we can send you a copy immediately.
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
25 * A wrapper for strings for buffered reading.
30 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
31 * @license http://framework.zend.com/license/new-bsd New BSD License
33 class Zend_Gdata_MimeFile
37 * A handle to the file that is part of the message.
41 protected $_fileHandle = null;
44 * Create a new MimeFile object.
46 * @param string $fileHandle An open file handle to the file being
49 public function __construct($fileHandle)
51 $this->_fileHandle = $fileHandle;
55 * Read the next chunk of the file.
57 * @param integer $bytesRequested The size of the chunk that is to be read.
58 * @return string A corresponding piece of the message. This could be
59 * binary or regular text.
61 public function read($bytesRequested)
63 return fread($this->_fileHandle, $bytesRequested);