* Fetch the next portion, if available.
* @throws IOException If there is any I/O problem
*/
@SuppressWarnings("unchecked")
private void fetch() throws IOException {
final RestResponse response = this.request.fetch()
.as(RestResponse.class)
.assertStatus(HttpURLConnection.HTTP_OK);
final WebLinkingResponse.Link link = response
.as(WebLinkingResponse.class)
.links()
.get("next");
if (link == null) {
this.more = false;
} else {
this.request = response.jump(link.uri());
}
final JsonArray arr = response.as(JsonResponse.class).json()
.readArray();
final Queue<P> list = new LinkedList<P>();
for (final JsonValue value : arr) {
list.add((P) value);
}