title: IOUtils.copy throws IOException for files larger than ~1 mb
body: <p>I'm using Apache Commons IO's IOUtils.copy to make copies of existing files, on Google Cloud Storage.</p>
  
  <p>Here is the problem: if the files goes beyond around 1 mb, <code>IOUtils.copy</code> will throw an exception. Files below 1 mb works perfectly fine.</p>
  
  <p><strong>Code snippet</strong></p>
  
  <pre><code>            AppEngineFile newFile = null;
              GSFileOptionsBuilder optionsBuilder = new GSFileOptionsBuilder().setBucket("bucket-name")
              .setKey(newFilename).setMimeType("image/jpeg");
  
      try {
  
          //currentFile is an instance of a AppEngineFile
          FileReadChannel readChannel = fileService.openReadChannel(currentFile, true);
  
          newFile = fileService.createNewGSFile(optionsBuilder.build());
  
          FileWriteChannel writeChannel = fileService.openWriteChannel(newFile, true);
  
          InputStream inputStream = Channels.newInputStream(readChannel);
          OutputStream outputStream = Channels.newOutputStream(writeChannel);
  
          IOUtils.copy(inputStream, outputStream);
          outputStream.flush();
          outputStream.close();
          inputStream.close();
          writeChannel.closeFinally();
  
      } catch (IOException e) {
          log.warning(e.toString());
      }
  </code></pre>
  
  <p><strong>I also attempted a more primitive method</strong>: but it doesn't work too</p>
  
  <pre><code>byte[] buffer = new byte[1024];
  int len = inputStream.read(buffer);
  while (len != -1) {
      outputStream.write(buffer, 0, len);
      len = inputStream.read(buffer);
  }
  </code></pre>
  
  <p>My assumption now: there is some kind of restriction on the App Engine platform. </p>
  
  <p>Note: I've also tried <code>IOUtiles.copyLarge</code> (which is meant for files larger than 2 GB), but it doesn't work too.</p>