|
|
@ -5,7 +5,7 @@ import java.io.InputStream |
|
|
|
internal actual fun getPlatformResourceReader(): ResourceReader = object : ResourceReader { |
|
|
|
internal actual fun getPlatformResourceReader(): ResourceReader = object : ResourceReader { |
|
|
|
override suspend fun read(path: String): ByteArray { |
|
|
|
override suspend fun read(path: String): ByteArray { |
|
|
|
val resource = getResourceAsStream(path) |
|
|
|
val resource = getResourceAsStream(path) |
|
|
|
return resource.readBytes() |
|
|
|
return resource.use { input -> input.readBytes() } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override suspend fun readPart(path: String, offset: Long, size: Long): ByteArray { |
|
|
|
override suspend fun readPart(path: String, offset: Long, size: Long): ByteArray { |
|
|
|