added a method for using channels to copy from input to output stream. Adapted the binary file marshaler to use this method. Should be faster than the copy logic which was there before.