From 778e91a2a84b8f011523dfa76cf9545304823c5c Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sat, 13 May 2023 02:24:47 -0600 Subject: download java, prefill checkboxes and choiceboxes --- app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Download.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Download.kt') diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Download.kt b/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Download.kt index 07a6eca..b98b511 100644 --- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Download.kt +++ b/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Download.kt @@ -14,9 +14,11 @@ class Download: Runnable { private final val MAX_BUFFER_SIZE: Number = 1024 private var url: URL + private var dir: String - constructor (url: URL) { + constructor (url: URL, dir: String) { this.url = url + this.dir = dir size = -1 downloaded = 0 status = Status.DOWNLOADING @@ -65,7 +67,7 @@ class Download: Runnable { } // Open file and seek to the end of it. - file = RandomAccessFile(getFilename(url), "rw"); + file = RandomAccessFile(dir + getFilename(url), "rw"); file.seek(downloaded.toLong()); stream = connection.getInputStream(); -- cgit v1.2.3