I have a string that contains a series of bits (for example, "01100011") and some integers in a while loop. For instance:
while (true) { int i = 100; String str = Input Series of bits
Now I want a good quick way to convert a string and int to an array of bytes. So far, what I have done is converting int
to String
, and then applying the getBytes()
method to both strings. However, it is a bit slow. Is there any other way to do that (maybe) faster than that?
source share