* @category TQ * @package TQ_Git * @subpackage StreamWrapper * @copyright Copyright (C) 2011 by TEQneers GmbH & Co. KG */ interface FileBuffer { /** * Returns the complete contents of the buffer * * @return string */ function getBuffer(); /** * Returns true if the pointer is at the end of the buffer * * @return boolean */ function isEof(); /** * Reads $count bytes from the buffer * * @param integer $count The number of bytes to read * @return string|null */ function read($count); /** * Writes the given date into the buffer at the current pointer position * * @param string $data The data to write * @return integer The number of bytes written */ function write($data); /** * Returns the current pointer position * * @return integer */ function getPosition(); /** * Sets the pointer position * * @param integer $position The position in bytes * @param integer $whence The reference from where to measure $position (SEEK_SET, SEEK_CUR or SEEK_END) * @return boolean True if the position could be set */ function setPosition($position, $whence); /** * Returns the stat information for the buffer * * @return array */ function getStat(); /** * Flushes the buffer to the storage media * * @return boolean */ function flush(); /** * Closes the buffer */ function close(); }