Changed data transfer to use bufferedstreams

Recommended by my prof. In a local environment (server and client in same
environment) there seems to be no improvment.