Add chunked support from PipeInputStreams
Add interface for testing.