title: Spring batch Item reader to iterate over a rest api call
body: <p>I have a spring batch job, which needs to fetch details from rest api call and process the particular data on my side. My rest api call will have mainly the below parameters : </p>
  
  <p>StartinIdNumber(offset)
  PageSize(limit)</p>
  
  <p><em>ps: StartinIdNumber serves the same purpose as rownumber or "offset" in this particular API. The API response results are sorted by IdNumber, so by specifying a StartinIdNumber, the API will in turn perform a "where IdNumber >= StartinIdNumber order by IdNumber limit pageSize" in their DB query.</em> </p>
  
  <p>It will return the given number of user details, I need to iterate through all the ids by changing the StartingIdNumber parameter for each request.</p>
  
  <p>I have seen current ItemReader implementations of spring batch framework,which read through database or xml etc. But I didn't come across any reader which helps in my case. Please suggest a way to iterate through the user details as specified above .</p>
  
  <p>Note : If I write my own custom item reader, I have to take care of preserving state (last processed "StartingIdNumer") which is proving challenging to me. </p>
  
  <p>Does implementing ItemStream serves my purpose? Or is there any better way?</p>