Using code like this:
Stream<Project> projects = gitlabApi.getProjectApi().getProjectsStream();
projects.limit(1).map(Project::getName).forEach(name -> System.out.println(name));
should results in getting only limited number of projects from gitlab server (not all of them), in this case only 1.