0

I have a string which represents an application (converted in bytes and then encoded in base64 -- if you ask yourself why, it is because i am transferring an application from a server to the client, in the hope of rebuilding it when transferred).

How would I get a Byte array back from this string?

A. Dato
  • 11
  • 4

1 Answers1

3

String class has what you need (in java, a String is a class)

   "this is a string".getBytes();

also take a look at this for base64 decoding of the String

org.apache.commons.codec.binary.Base64

java from 8 and beyond also has a base64 class built-in

java.util.Base64
Elentriel
  • 1,237
  • 8
  • 21