Example #1
0
 /**
  * Reads bytes
  * 
  * @param integer $num
  *
  * @return array An array of bytes
  */
 protected function readBytesBigEndian($num = 1)
 {
     $bytes = array();
     for ($i = 0; $i < $num; $i++) {
         $bytes[$i] = ord($this->file->getStream());
     }
     return $bytes;
 }
Example #2
0
 /**
  * Skips a sequence
  * 
  * @param integer $num
  * @return void
  */
 public function skip($num = 1)
 {
     $this->file->getStream($num);
 }
Example #3
0
 /**
  * Pointer exception
  * @expectedException Exception
  */
 public function testPointerException()
 {
     $file = new File($this->filename);
     $file->getStream(1);
     $file->getStream(50000000);
 }