Merge "InputStream returns -1 on EOF instead of throwing IOException"