Allow proxying of multi packet data.

When dealing with multi-packet data, the current implementation truncates as `read` only reads a portion of the buffer. According to the [documentation](http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html#read(byte[])), `read` should be called until it returns `-1` number of bytes read.