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 * 14 * Classes implementing this interface may use a subsystem which requires less 15 * memory than working with large strings of data. 16 * 17 * @author Chris Corbyn 18 */ 19interface Swift_OutputByteStream 20{ 21 /** 22 * Reads $length bytes from the stream into a string and moves the pointer 23 * through the stream by $length. 24 * 25 * If less bytes exist than are requested the remaining bytes are given instead. 26 * If no bytes are remaining at all, boolean false is returned. 27 * 28 * @param int $length 29 * 30 * @throws Swift_IoException 31 * 32 * @return string|bool 33 */ 34 public function read($length); 35 36 /** 37 * Move the internal read pointer to $byteOffset in the stream. 38 * 39 * @param int $byteOffset 40 * 41 * @throws Swift_IoException 42 * 43 * @return bool 44 */ 45 public function setReadPointer($byteOffset); 46} 47