Return void when writing data

This is the same as OutputStreams in Java work.

Now the read and write methods are equal to the Input and OutputStreams
in Java
Small typo and whitespace fix