int offsetValue = convertInt(offset, "Paging info \"%s\" contains the invalid offset: \"%s\"", header,
offset);
int lastIndexValue = convertInt(lastIndex, "Paging info \"%s\" contains the invalid last index: \"%s\"",
header, lastIndex);
int pageSize = lastIndexValue - offsetValue + 1;
return new PageInfo(offsetValue, pageSize);
}
else
{
String error = String.format("Paging info has the wrong format. Expected: %s, given: \"%s\"", REGEXP,
header);