jruby/jruby — pull request #683 by pfoorion (2013-04-30 07:11:31+00:00)
Title: Fix unseekable stream implementation of IO.copy_stream in RubyIO.java

Fixes JRUBY-7157
Fixed the transfer method to properly handle the fact that Java's FileChannel transferFrom method doesn't update the position of the destination channel. This version of the transfer method is only called if the source stream is unseekable (i.e. a socket or, in my case ServletUpload's FileItemStream). The bug occurs if the size of the source is greater than 4196 bytes.