code: public static long copyStream(OutputStream dst, InputStream src) throws IOException {
  		long copied;
  
  		if (dst instanceof FileOutputStream && src instanceof FileInputStream) {
  			try (FileChannel dstChannel = ((FileOutputStream) dst).getChannel();
  					FileChannel srcChannel = ((FileInputStream) src).getChannel()) {
  				copied = copyStreamChannel(dstChannel, srcChannel);
  			}
  		} else {
  			copied = copyStreamStandard(dst, src);
  		}
  		return copied;
  	}
docs: Copies all bytes from an {@linkplain InputStream} to an {@linkplain OutputStream}.
  
  @param dst the {@linkplain OutputStream} to copy to.
  @param src the {@linkplain InputStream} to copy from.
  @return the number of copied bytes.
  @throws IOException if an I/O error occurs.