class Aws::S3::Encryption::IOEncrypter

def read(bytes = nil, output_buffer = nil)

def read(bytes =  nil, output_buffer = nil)
  if Tempfile === @encrypted && @encrypted.closed?
    @encrypted.open
    @encrypted.binmode
  end
  @encrypted.read(bytes, output_buffer)
end