copyTo

fun InputStream.copyTo(target: Path, vararg options: CopyOption): Long


See overload of Files.copy which takes in an InputStream.