Module: IOExtras

Defined in:
lib/zip/ioextras.rb

Overview

:nodoc:

Defined Under Namespace

Modules: AbstractInputStream, AbstractOutputStream, FakeIO

Constant Summary

CHUNK_SIZE =
32768
RANGE_ALL =
0..-1

Class Method Summary (collapse)

Class Method Details

+ (Object) copy_stream(ostream, istream)



7
8
9
10
# File 'lib/zip/ioextras.rb', line 7

def self.copy_stream(ostream, istream)
  s = ''
  ostream.write(istream.read(CHUNK_SIZE, s)) until istream.eof? 
end