code: public User[] load(int index, int length) throws Exception, IllegalArgumentException
     {
        validateParameters(index, length);
  
        if (length == 0)
        {
           return new User[0];
        }
  
        Session session = service.getStorageSession();
        try
        {
           reuseIterator(session, index);
  
           User[] entities = new User[length];
           int processed = 0;
  
           while (iterator.hasNext() && processed != length)
           {
              Node n = iterator.nextNode();
              if (!accept(n))
                 continue;
              entities[processed++] = (User)readObject(n);
           }
  
           if (processed != length)
           {
              throw new IllegalArgumentException(
                 "Illegal index or length: sum of the index and the length cannot be greater than the list size");
           }
  
           return entities;
        }
        finally
        {
           session.logout();
        }
     }
docs: {@inheritDoc}