factored out read-block behavior from stream wrapper class in preparation to implement write stream. fixed bug in read() data copying if read block size didn't divide io buffer size