Skip to content

Example client that reads a `java.io.InputStream` and wraps it into a `java.util.stream.Stream` instance.

Notifications You must be signed in to change notification settings

wjbakker/todo-stream-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Example client that reads Json contents from a java.io.InputStream and wraps the result into a java.util.stream.Stream instance.

Usage

Given the following Todo list:

Todo

When the following code is run:

TodoResource todoResource = new TodoResource("http://localhost:8080/todos");

Stream<Todo> stream = todoResource.stream();

try(stream) {
    stream.filter(Predicate.not(Todo::isCompleted)).forEach(System.out::println);
}

Then the following output is produced:

Todo{title='Present at JFall', completed=false, order=3}
Todo{title='Celebrate success', completed=false, order=4}

Dependencies

About

Example client that reads a `java.io.InputStream` and wraps it into a `java.util.stream.Stream` instance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages