Question: Use the example below create a method that takes a string and translates it into a byte array. public static byte[] stringToRle(String rleString) Ex: stringToRle(15f:64)
Use the example below create a method that takes a string and translates it into a byte array.
public static byte[] stringToRle(String rleString)
Ex: stringToRle("15f:64") yields byte array { 15, 15, 6, 4 }.
I need help with this in JAVA. The delimiter needs to be removed and it needs to be converted into a Byte array. Could you please also explain how a String.split(":") would be implemented in the code?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
