public function readInteger()
    {
        try {
            $bin = $this->getStream()->read(4);

            return current(unpack('l', $bin));
        } catch (StreamException $e) {
            $this->handleStreamException($e, BinaryStreamAccessException::INT);
        }
    }