1: <?php
2:
3: /*
4: * This file is part of SwiftMailer.
5: * (c) 2004-2009 Chris Corbyn
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: /**
12: * An abstract means of reading data.
13: * Classes implementing this interface may use a subsystem which requires less
14: * memory than working with large strings of data.
15: * @package Swift
16: * @subpackage ByteStream
17: * @author Chris Corbyn
18: */
19: interface Swift_OutputByteStream
20: {
21: /**
22: * Reads $length bytes from the stream into a string and moves the pointer
23: * through the stream by $length. If less bytes exist than are requested the
24: * remaining bytes are given instead. If no bytes are remaining at all, boolean
25: * false is returned.
26: * @param int $length
27: * @return string
28: * @throws Swift_IoException
29: */
30: public function read($length);
31:
32: /**
33: * Move the internal read pointer to $byteOffset in the stream.
34: * @param int $byteOffset
35: * @return boolean
36: * @throws Swift_IoException
37: */
38: public function setReadPointer($byteOffset);
39: }
40: