public function offsetExists($offset)
    {
        try {
            $res = $this
                ->seekToOffset($offset)
                ->valid();
        } catch (OutOfRangeException $e) {
            $res = false;
        }
        return (bool) $res;
    }