Text to binary convertion

this lil code supposed to print out the binary value of what is in the string, however when a "!" or a " " space is passed i dont get the 8 digits instead i get 7
" " = 0100000
not 00100000 (the value i supposed )
here is the code that i came up with
public class convert
public static void main(String[] args)
StringBuffer buffer = new StringBuffer();
String s = " ";
for (int i = 0; i < s.length(); i++)
buffer.append(00000000+Integer.toString(s.charAt(i),2));
System.out.println(buffer);
}

also any idea on how to unconvert the binary value
back to normal text?? i came up with this Have you executed this code? You aren't converting anything here. You need to convert each byte to a char and append that to your buf.
When you post code, please put your code between [code][/code] tags for readability.
>
public class test
public static void main(String args[])
StringBuffer buf = new StringBuffer();
String str="01101000011001010110110001110000";
if((str.length()%2)==1)
System.err.print("bad bin string");
else
for(int i=0;i<str.length();i+=8)
buf.append(str.substring(i,i+7));
System.out.println(buf);
i use the remainder of 1 to check to see is it a good
string or a bad 1, thats why i need the 8 digits

Similar Messages

  • Sender FTP Adapter, text mode should convert source file?

    Hi !
    We have a Unix file system where systems and people drop files to be captured by XI. XI runs also on another Unix system.
    We configured the Sender FTP comm channel from XI to use the TEXT mode, to have converted the captured file to Unix TEXT (eol = 0x0A), no matter the format of the file used to transfer the source file to the XI polling folder.
    But we noticed that TEXT or BINARY modes in sender FTP adapter works all the same, like binary.
    What are we doing wrong?
    Thanks,
    Matias

    No. to see the difference put a gif and give txt in file adapter you will get an error for the same file u use binary it works.
    their is difference b/w these . if you use special characters like european then you need to use UTF-8 or UTF-16 or bigInidan  if it is binary then you output will junk charaters for these sysmobls
    Message was edited by:
            Sreeram Reddy

  • Text to binary

    Hello All,
    i want to know what and all ways i can read the data in j2me for example prayer times.
    one of my old colleague used text to binary conversion. but he is not in contact to ask the help. can anyone help me in regard to this.
    thanks in advance

    also any idea on how to unconvert the binary value
    back to normal text?? i came up with this Have you executed this code? You aren't converting anything here. You need to convert each byte to a char and append that to your buf.
    When you post code, please put your code between [code][/code] tags for readability.
    >
    public class test
    public static void main(String args[])
    StringBuffer buf = new StringBuffer();
    String str="01101000011001010110110001110000";
    if((str.length()%2)==1)
    System.err.print("bad bin string");
    else
    for(int i=0;i<str.length();i+=8)
    buf.append(str.substring(i,i+7));
    System.out.println(buf);
    i use the remainder of 1 to check to see is it a good
    string or a bad 1, thats why i need the 8 digits

  • The bullet list, numbered list and the normal text is not converting when I am converting from RH 9 to MS Word 2010

    Hi all,
    Greetings for the day
    I am created a new CSS in Robohelp 9. I have also created a new template in Word 2010. The style sets for different information elements like (Heading, bullets, body text, ) are more or less same between the CSS and the new templates. I am also able to map the .css styles to Word template when I am converting from RH to Word as I am getting the necessary option in the drop-down list.
    However, when the output is generated, the bullet, the numbered list and the body text is not converting at all. The body text works sometimes. However, the numbered list and bullet list is coming out as images.
    If anybody knows the solution, I can share the .css and Word template.
    Thanks in advance.
    Regards,
    Parag Deb

    Create a new project with two or three topics containing lists of both types. Generate a printed output that shows the problem. Then zip it up and send it to me. See the Contact page on my site for instructions.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do I copy and paste text from a converted Word document?

    I just converted a pdf file into word.  I want to copy and paste the informatiuon into another document.  How do I do that?

    Hi Sara.  Tanks for responding.  If I cannot figure this out (I  was up
    until 2am last night), I want to cancel my subscription.
    Here are two files you can check on/help me with.  When I try again,  it
    comes up 'an error has occurred when trying to access the service.'
    Please advise.
    Pat Tomassi
    In a message dated 11/1/2014 12:55:23 A.M. Eastern Daylight Time, 
    [email protected] writes:
    How  do I copy and paste text from a converted Word document?
    created by Sara.Forsberg (https://forums.adobe.com/people/Sara.Forsberg) 
    in Adobe Acrobat.com Services - View the full  discussion
    (https://forums.adobe.com/message/6888908#6888908)

  • Distorting text/images in converting from pmd to pdf

    My company uses PageMaker 7.0 to create our manuals and brochures and then converts them into pdf's. I've run into this problem before and found that if I didn't properly place or import an image (not copy and paste an image or text) that once converting it into a pdf only a portion of the image would be there or everyother 3rd letter would exist. Thought we had corrected it. The creator of this last document saw everything correctly but when another employee opened the pdf file through the network it was distorted and wrong. I opened the document and "saved as" in my documents and then everything seemed fine from my computer but then the creator opened the file on his computer and it was wrong. The link info on some of the images is wrong even though it was placed properly- the text was entered in Pagemaker but on the pdf is missing letters and causing odd spacing. I'm at a loss now on how to correct this. I hate to upgrade when pagemaker is more than sufficient for the basic manuals we do. I did notice that I was using Reader 9 wheras they still had 8 on their computers- already had them upgrade but didn't think this would be a real issue. Any ideas on the problem or how to correct would be greatly appreciated!!

    Look in the application where the users are generating the PostScript.
    Many of them have an option "print last page first", so this naturally
    produces a backwards PDF.
    Aandi Inston

  • Inline Text Boxes getting converted to inline tags on text reflow in parent

    Hi,
    We extract text from a text box in a Indesign CS3 document. The text box can have inline text boxes. The text of the inline boxes is extracted as well.
    The text extracted from all the text frames is processed in an xml and processed. After processing, it is reflown into the boxes.
    When we try to import the text in the parent text frame having inline boxes, the inline text boxes are converted to inline tags.
    Can we keep the inline text boxes as it is rather than they getting converted to the inline tags.
    Thanks.

    Hello Harbs,
    Thanks for the reply. By recreating the boxes, do you mean to say that we draw the boxes again and place them in the main text frame as an inline box.
    But the problem again is that if we attach the xml element of the parent element to the text frame, it will flow all the contents including the inline boxes which will be again convert them to inline tags.
    Or is it that we flow the parent text and then look for all the inline tags and draw boxes in place of these tags. But the question here is how do we differentiate between an genuine inline tag and the one which is converted from an inline box.
    Can you help in describing the solution in your mind.
    Thanks

  • Illustrator image copy/paste onto the Indesign the text should automatically converted into image?

    Hi All,
    Is there options to get the image copy & paste into the Indesign, if i done manually the frames and lines stroke, colors, are coming fine, but the text object only converted the image. i want to edit text  in indesign.
    this is possible for scripting or manual?
    regards
    CSM_PHIL

    You can copy/paste from Illy to ID by selecting the text with the type tool in Illy and then pasting it into ID. You will not be able to maintain the formatting. If you want to maintain the appearance the text will be converted to outlines.
    If you need to get anything other than very simple objects from Illy to ID then you should save as AI and use the file > place command to place those objects as linked graphics into ID.
    Your closing statement is irrelevant. Whether you like it or not, this is the way it is.
    Bob

  • Not able to edit existing text in a converted to Word PDF file.

    I cannot edit text in a converted to word  PDf file. I can only add text. Why? I am using Export PDF

    Hi Mark,
    Have you tried triple clicking on your document? Sometimes the conversion can come across as an image.
    Let me know if that works!

  • How do I keep text in a converted file??

    I want to convert a PDF file that I received as an email attachement.  Can I convert it without saving it first.  It is the type that will let you save a blank form but not the info typed in and I don't want to retype the entire form.

    When I try to save it only the form is saved not the text that was typed in.  I want to save the info so I don't have to retype it.Bob
    Date: Tue, 10 Jan 2012 14:32:10 -0700
    From: [email protected]
    To: [Removed by moderator]
    Subject: Re: How do I keep text in a converted file?? How do I keep text in a converted file??
        Re: How do I keep text in a converted file??
        created by Dave Stromfeld in Adobe CreatePDF - View the full discussion
    Hi, Bob.Yes, CreatePDF will allow you to save a PDF file as a Word file, so you can then type and add text to that Word file. If you received it as an email attachment, it will be easiest to: 1) save it to your computer's desktop, 2) upload it to the CreatePDF service.Please let us know if you have additional questions or issues.Regards,Dave
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Re: How do I keep text in a converted file??
    To unsubscribe from this thread, please visit the message page at Re: How do I keep text in a converted file??. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe CreatePDF by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Text to speech converter

    Hello,
    I'm doing a project on text to speech converter using java and i'm very confused. What speech engine should i use? and how do i use it with java? i've downloaded javax package but when i run the sample codes hello world from Java speech api, it does work n i'm geting compiling errors saying tht package javax.speech does not exist.
    plz i badly need help to clear my confusion.
    thanks
    muskaan

    I would like to add a ability to my website http://www.artikelpedia.com whitch is in deutch language to be translated online from Germay to English. I have some pages now in english: http://www.artikelpedia.com/artikel/englisch/9/englisch5.php deutsch: http://www.artikelpedia.com/artikel/deutsch/27/deutsch2.php and franch: http://www.artikelpedia.com/artikel/kunst/2/kunst5.php
    but i wolud like to offer to my visitors ability to translate this pages from one language to another.
    For any sugestions about price and other facility of using java for thi please reply

  • Text fields being converted to Long in Data Integrator v 11.7

    I am a new user to BODI, and I recently experienced an issue with source "TEXT" fields being converted to "LONG" in the Query and Target datastores respectively. I am using Data Integrator v 11.7 and my question is does anyone know whether or not this issue has been resolved in Data Services XI 3..x? if so, can you also provide documentation on this exact issue? Thanks in advance.
    Lonnie

    Yes, we did some changes in DI 12.0. But what is the problem? A SQL Server TEXT datatype is a text with unlimited length whereas a varchar(maxsize) is limited. In Oracle a CLOB is the same thing. And in DI we call a text of unlimited size a LONG datatype.

  • HT3529 Is there anyway to take my whole text conversation and convert it to a email or reading document

    Is there a way to take a entire text conversation and convert it or copy it to an email for easier reading?

    One way to do this, is to open the message, and choose one of the conversation bubbles.  If you hold it down, the conversation bubbles will have a small circle next to them.  If you select all of the circles you wish to keep, at the bottom of the screen there should be an arrow that you can use to forward the selected text to the email of your choice. Hope this helps.

  • Pdf image whit text want to convert in  word

    pdf image whit text want to convert in  word

    Please post your question at this link:
    <https://forums.adobe.com/community/acrobat/creating__editing_%26_exporting_pdfs>
    And also explain better because an image is an image and it can't be
    changed to anything else but if you explain your requirements then
    somebody will come out with a solution for you.
    Good luck.

  • I have purchased adobe pdf pack so i can delete some text from my converted files, this will only let me add text but not delete any, please help

    i have purchased adobe pdf pack so i can delete some text from my converted files, this will only let me add text but not delete any, please help

    I tyhink that you need ExportPDF, Adobe ExportPDF (read only). In any case, thius may help: Cancel your membership or subscription | Acrobat.com online services

Maybe you are looking for

  • Multiple albums of same name

    im having a problem with my ipod making Multiple albums of same name in itunes it shows all the songs under the same album name but on the ipod in album view the same album comes up multiple times..how can i fix that?

  • Pdf  mail merge like / FOP / PLPDF

    Hi to all, does exist any products that run as well with Oracle xe, that allow user to do a 'mailmerge like' linking with data? I'll try to explain better what i'm looking for: 1- A Model designer will do the pdf, with graphic and map the db field ac

  • How to apply archivelogs from 2 node rac to non-rac

    Is there any way to apply the archivelogs from 2 node RAC to sinlge node non-rac instance while migrating RAC to non-rac. Could anyone clarify it? -Shanlee

  • CPU Patch Project

    This is the project i have been assigned need suggestion, queris to check CPU,(qualified DBs), Road map...etc, any other suggestion PHASE I 1) Identify all the existing oracle versions across the board for the preparation of cpu patch ===> you can lo

  • I want to learn SAP on Oracle?

    Hi All, I am new to this thing, please guide from scratch, so that i can start.