Join Slack
Powered by
<Kotlin khttp creates partial streams> Kotlin code...
# stackoverflow
u
user
10/16/2018, 10:31 AM
Kotlin khttp creates partial streams
Kotlin code: import khttp.get val file = File("mega.zip") val r = get("
http://www1.caixa.gov.br/loterias/_arquivos/loterias/D_mgsasc.zip
", stream=true) for (chunk in r.contentIterator(1024)) { file.appendBytes(chunk) } Sometimes creates a partial file when running as Intellij IDEA Kotlin JVM project. Is it a code or IDE problem?
Open in Slack
Previous
Next