flushBuffers() public method

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public flushBuffers ( )
 public function testFlushContentClearsKey()
 {
     $cache = $this->getMock('Swift_KeyCache');
     $cache->expects($this->once())->method('clearKey')->with($this->_nsKey, 'foo');
     $stream = new Swift_KeyCache_SimpleKeyCacheInputStream();
     $stream->setKeyCache($cache);
     $stream->setNsKey($this->_nsKey);
     $stream->setItemKey('foo');
     $stream->flushBuffers();
 }
 public function testFlushContentClearsKey()
 {
     $cache = $this->_createKeyCache();
     $this->_checking(Expectations::create()->one($cache)->clearKey($this->_nsKey, 'foo'));
     $stream = new Swift_KeyCache_SimpleKeyCacheInputStream();
     $stream->setKeyCache($cache);
     $stream->setNsKey($this->_nsKey);
     $stream->setItemKey('foo');
     $stream->flushBuffers();
 }