Exemplo n.º 1
0
 /**
  * Process the raw data from a binary stream
  * 
  * @param   Woops_Icc_Binary_Stream The IC binary stream
  * @return  void
  */
 public function processData(Woops_Icc_Binary_Stream $stream)
 {
     $this->_tags = array();
     $tagCount = $stream->bigEndianUnsignedLong();
     for ($i = 0; $i < $tagCount; $i++) {
         $type = $stream->bigEndianUnsignedLong();
         $datOffset = $stream->bigEndianUnsignedLong();
         $size = $stream->bigEndianUnsignedLong();
         $offset = $stream->getOffset();
         try {
             $tag = $this->newTag($type);
         } catch (Woops_Icc_TagTable_Exception $e) {
             if ($e->getCode() !== Woops_Icc_TagTable_Exception::EXCEPTION_INVALID_TAG_TYPE) {
                 throw $e;
             }
             $tag = new Woops_Icc_UnknownTag($type);
             $this->_tags[] = $tag;
         }
     }
 }