read(byte[] b) : "Reads some number of bytes from the input stream and stores them into the buffer array b."
Some bytes != all bytes.
use read(byte[] b, int off, int len) , where off = 0 and len...