In order to convert a byte array to String, you can make use of the String construction that takes in a byte array as an input argument,
Example:fun main() {
val byteArray = byteArrayOf(80,81,83,84,85,86)
val myStr = String(byteArray)
println(myStr)
}
Output:
PQRSTUV
Have Questions? Post them here!
More Posts related to HowTos,
- Brew Error - This command updates brew itself and does not take formula names
- Add X days from today in Command Line
- How to find someone on Instagram
- cURL HTTP GET request command examples
- Free Unlimited Calls from MTNL & BSNL Landlines from 1st May 2015
- Why I see Download pre-built shared indexes in IntelliJ
- How to display line numbers in Terminal while displaying content of a file
- How to install Postman natively on a Mac
- Display bookmarks bar Safari
- [Error] zsh: command not found: mvn
- How to rerun last command in Zsh shell
- How to identify the version of IntelliJ
- How to convert byte array to String [Kotlin]
- How to install Zsh shell
- How to stop or quit cat command?
- [Fix] Steam: Friends Network Unreachable Error
- How to Kill service running on port using terminal command
- How to Generate Self-Signed OpenSSL certificate in three easy steps
- How to enable line numbers in IntelliJ
- Copy all .vcf Mobile Contacts files into one .vcf
- How to write hello world different languages syntax
- What is HTTP 500 Internal Server Error Code on web browsers
- How to get an embed code from Vimeo?
- [Error] There was an error connecting to the apple id server
- Unzip a Zip file from Terminal Command
More Posts:
- How to serialize-deserialize an object in java - Java
- Android Studio : Connection Error : Failed to download patch file - Android-Studio
- Java SE 8 Update 301 available with various bug fixes and security improvements - Java
- Java: Check Internet connection on Android Device (Wifi or Mobile) - Android
- How to enable line numbers in IntelliJ Android Studio for all files - Android-Studio
- Unhandled exception type InterruptedException : Java Threads - Java
- How to identify installed Java (JDK) Version on macOS - MacOS
- How to Generate Self-Signed OpenSSL certificate in three easy steps - HowTos