mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
Use DEFAULT_BUFFER_SIZE
This commit is contained in:
parent
a1b471d2ca
commit
8b79c5c76b
@ -13,7 +13,7 @@ fun PathedFile.asStream(
|
|||||||
fun PathedFile.asFile(
|
fun PathedFile.asFile(
|
||||||
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
|
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
|
||||||
dest: File = File.createTempFile(this.fileUniqueId, this.filename),
|
dest: File = File.createTempFile(this.fileUniqueId, this.filename),
|
||||||
defaultBufferSize: Int = 1024
|
defaultBufferSize: Int = DEFAULT_BUFFER_SIZE
|
||||||
): File {
|
): File {
|
||||||
this.asStream(telegramAPIUrlsKeeper).use { input ->
|
this.asStream(telegramAPIUrlsKeeper).use { input ->
|
||||||
FileOutputStream(dest).use { out ->
|
FileOutputStream(dest).use { out ->
|
||||||
|
Loading…
Reference in New Issue
Block a user