SRL Archive - Java Help and Tutorials

Omfg!


Blender

2009-02-14 00:32:19

Ok, this MAY sound a bit frantic, but I am REALLY pissed. I went on Sun Forums, Google, even the library, but still no luck. Can someone with at least SOME Java knowledge point me to a reliable class or function that converts strings to and from binary?

Thanks!

markuska815

2009-02-14 00:47:16

Is the string a string of letters and characters or is it numbers?

Yakman

2009-02-14 06:25:49

perhaps a byte array? i dont know what you mean by 'to and from binary'

string.getBytes();
string = new String(bytes);

Blender

2009-02-14 11:57:38

@markuska815

It is a string of letters, numbers, and special characters.

Blender

2009-02-14 11:59:09

@Yakman

I mean take the binary representation of letters, numbers, and special characters (all in one string), then convert them into binary (1's and 0's).

Yakman

2009-02-15 12:01:30

look at Integer.toBinaryString()