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 Ascii to binary and binary to ascii Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Ascii to binary and binary to ascii" Watch "Ascii to binary and binary to ascii" New topic
Author

Ascii to binary and binary to ascii

J amodi
Greenhorn

Joined: Nov 09, 2011
Posts: 14
Hi,

Can anyone help me out , how do I get ascii to binary and binary to ascii in java ?

Thanks.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3133
What exactly do you mean? ASCII is binary.

Please TellTheDetails(⇐click) about what you're trying to do, and provide an example or two.
J amodi
Greenhorn

Joined: Nov 09, 2011
Posts: 14
Hi,

I have a code which converts Ascii string to binary .. which is this !!



so if I give my string as "foo".. it gives me binary string as 01100110 01101111 01101111

Now, I need to convert this binary number to ascii value. How do I do this ?

Thanks.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3133
Okay, I see what you mean now.


so if I give my string as "foo".. it gives me binary string as 01100110 01101111 01101111

Now, I need to convert this binary number to ascii value. How do I do this ?


Well, your first step, as it always is with programming, is to figure out how you would do this "manually", without Java. What are the small, simple, precise steps?
J amodi
Greenhorn

Joined: Nov 09, 2011
Posts: 14
Dear Sir,

I am right now in a hurry, i need to complete something asap. Will you be able to help me out with code ?

thanks
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3133
J amodi wrote:Dear Sir,

I am right now in a hurry, i need to complete something asap.


That is not the concern of anybody here, and mentioning it will tend to drive people away, so please EaseUp.(⇐click)

Will you be able to help me out with code ?


I could, but I won't. This site is NotACodeMill.(⇐click) Giving you code doesn't help you learn, and it's unethical for somebody else to do work that is your responsibility.
J amodi
Greenhorn

Joined: Nov 09, 2011
Posts: 14
Ok. Fine, could you tell me what are the steps to convert ?


Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3133
J amodi wrote:Ok. Fine, could you tell me what are the steps to convert ?


So, if you see 01100110, you have no idea how to turn that into 'f'? That is, even if somebody just gives you "01100110", you have no idea what to do with it?
 
 
subject: Ascii to binary and binary to ascii
 
Threads others viewed
Checking if a file is binary/ascii in Java
ascii to number conversion in java
Binary to Ascii converter in Java?
how do u convert ascii to binary?
Sending large data volumes to a JSP
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture