read input stream in chunks instead of fully. Works with OpenHFT SharedHashMap now