Created
January 24, 2019 09:23
-
-
Save liangfeidotme/8d3bfa5dcd7ddbff1a149aead19cd49a to your computer and use it in GitHub Desktop.
Read the asset file into a String.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object FileUtils { | |
fun readAssetFileToString(context: Context, assetFileName: String) | |
= context.assets.open(assetFileName).bufferedReader().use { it.readText() } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment