Add readSome / writeSome methods
Sockets (and some other stream types) should have readSome/writeSome methods which are allowed to process only part of a buffer. The read/write methods should always try to write the whole buffer. Maybe readSome/writeSome only makes sense in async I/O anyway.
Maybe some additional interface would be appropriate or we simply implement this in the abstract class AbstractInputStream / AbstractOutputStream.
HttpInputStream and HttpOutputStream then could be simplified at some places.