From: Brandon Casci Date: 2007-11-02T09:42:19+09:00 Subject: IOS troubles with binary data on windows I'm at a loss. Writing data from a file to an IOS blows up on windows. You get ' Invalid argument (Errno::EINVAL)'. The code is below. @ezstream is an IOS opened r+b. If I read the files with http it works. As in http_req_result.read_body { |segment| @ezstream.write segment}.....this works. Any suggestions? It's really strange. Here is the code: f = File.open(track_info['file_path'],'rb') chunk = '' until chunk.nil? chunk = f.read(16000,'rb') unless chunk.nil? @ezstream.write chunk #blows up here end end -- Posted via http://www.ruby-forum.com/.