/** * 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()); }
/** * 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; }