code: @SuppressWarnings("checkstyle:magicnumber")
  	public static void copy(InputStream in, int inSize, FileOutputStream out) throws IOException {
  		assert in != null;
  		assert out != null;
  		try (ReadableByteChannel inChannel = Channels.newChannel(in)) {
  			try (FileChannel outChannel = out.getChannel()) {
  				// apparently has trouble copying large files on Windows
  				if (inSize < 0 || OperatingSystem.WIN.isCurrentOS()) {
  					// magic number for Windows, 64Mb - 32Kb
  					final int maxCount = (64 * 1024 * 1024) - (32 * 1024);
  					long position = 0;
  					long copied = 1;
  					while ((inSize >= 0 && position < inSize) || (inSize < 0 && copied > 0)) {
  						copied = outChannel.transferFrom(inChannel, position, maxCount);
  						position += copied;
  					}
  				} else {
  					outChannel.transferFrom(inChannel, 0, inSize);
  				}
  			}
  		}
  	}
docs: Copy the first file into the second file.
  
  <p>The content of the second file will be lost.
  This copy function allows to do a copy between two different
  partitions.
  
  @param in is the input stream to read.
  @param inSize is the total size of the input stream.
  @param out is the output stream.
  @throws IOException when copy error occurs.
  @since 6.2