OnlineKnowledgeRepository


For Questions and Assistance please use the proper Category.. please..
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Welcome guys!!.. In order for you guys to post your Questions and assistance requests,, please REGISTER first.. Only members can post.. If you have requests then feel free to email ADMIN neuron or SPAMMER onatzky.. thanks!
Search
 
 

Display results as :
 
Rechercher Advanced Search
Donation box
Latest topics
» Convert signed ZD to PD
Converting Binary to String In Java EmptyThu Sep 01, 2016 7:57 pm by neuron

» Abia State Polytechnic Admission form for 2013/2014 out!
Converting Binary to String In Java EmptyTue Oct 08, 2013 9:30 am by stevejoo

» Convert ZD to SIGNED PD
Converting Binary to String In Java EmptySun Sep 08, 2013 9:22 pm by neuron

» How to Speed Up My PC
Converting Binary to String In Java EmptyTue Feb 26, 2013 9:15 am by alphysudaria143

» Hi I'm alphysudaria143
Converting Binary to String In Java EmptySun Feb 17, 2013 12:25 am by alphysudaria143

» How to Copy all the Generations of a GDG
Converting Binary to String In Java EmptyThu Oct 11, 2012 8:30 am by neuron

» Remove Duplicates in a dataset though Sort
Converting Binary to String In Java EmptyThu Oct 11, 2012 8:23 am by neuron

» how to insert data into your access database vb.net
Converting Binary to String In Java EmptyTue Aug 14, 2012 9:56 am by neuron

» how to populate combobox in vb.net during form load
Converting Binary to String In Java EmptyTue Aug 14, 2012 9:53 am by neuron

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Help
Please support me my registering to NEOBUX
advertisements
Converting Binary to String In Java Banner3
Affiliates
free forum
 



Share
 

 Converting Binary to String In Java

Go down 
AuthorMessage
neuron
Administrator
Administrator
neuron

Posts : 38
Join date : 2009-08-06

Converting Binary to String In Java Empty
PostSubject: Converting Binary to String In Java   Converting Binary to String In Java EmptyThu Aug 06, 2009 9:18 am

converting binary to string is as simple as:

Code:

String cmdStr;
cmdStr = new BufferedReader(new InputStreamReader(System.in)).readLine();
int to;
String result2 = "";
for(int i =0;i < cmdStr.length(); i+=8 ) {
if((i+8) > cmdStr.length()) { to = cmdStr.length(); }
else { to = (i+8);
String tessst = cmdStr.substring(i,to);
Long characterObj = Long.valueOf(tessst, 2);
long character = characterObj.longValue();
Character c = new Character((char)character);
result2 += c;
out.println(c);
Back to top Go down
View user profile http://myonlinekr.forumotion.com
 
Converting Binary to String In Java
Back to top 
Page 1 of 1
 Similar topics
-
» A wee bit of 5-string banjo Rock & Roll
» Applegate mechanism for Hot Jupiters

Permissions in this forum:You cannot reply to topics in this forum
OnlineKnowledgeRepository :: All About PC :: Programming :: JAVA-
Jump to: