Ejemplo n.º 1
0
 /**
  * Read data from Stream and cast it to integer.
  *
  * @param AbstractStream $stream Stream from which read.
  * @return int Result value.
  */
 public function read(AbstractStream $stream)
 {
     return $stream->getBuffer()->readInt($this->getSize(), $this->getSigned(), $this->getEndian());
 }
Ejemplo n.º 2
0
 /**
  * Tells current Stream to skip given amount of bits.
  *
  * @param AbstractStream $stream Stream which which should skip data.
  * @return null To detect that no value has been read.
  */
 public function read(AbstractStream $stream)
 {
     $stream->skip($this->getSize());
     return null;
 }