File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes String or Char -> Binary Representation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "String or Char -> Binary Representation" Watch "String or Char -> Binary Representation" New topic
Author

String or Char -> Binary Representation

Ilko Ivanov
Greenhorn

Joined: Aug 04, 2011
Posts: 9
Hi guys,
I don't really know how it works but I wanna convert a String to its binary representation.
It can be done char by char or the whole String at once.

Thank you!


http://www.encodedmessages.com
Todd Buell
Greenhorn

Joined: May 31, 2005
Posts: 21
I believe you're looking for the String.getBytes methods. Be sure to read up on which you need, depending on the encoding of the String.

Also useful would be Integer.toBinaryString.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: String or Char -> Binary Representation
 
Similar Threads
insertion operator
Ques. from JTips Mock 1
Need Help: Recursive Code -- > Loop
Binary to char?
String to Binary?