Results 1 to 2 of 2
  1. #1
    ali_sakar is offline Member
    Join Date
    Feb 2009
    Rep Power

    Cool Getting ascii from a String


    Below are lines of codes how I get the data from serial port.

    byte[] readBuffer = new byte[1];
    int numBytes =;
    String result = new String(readBuffer);

    This data which I get from serial port is a Delivery Report from GSM modem. I read it 1 character at a time. These characters also contains junk characters like '>', 'Enter Key',etc.. I want to make it more understandable by only putting text characters in a text file. Now for this I want to check the ascii values of these characters.

    Can anyone help in How to get the ascii values from a String variable.


  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power


    Read the API for String.replaceAll and java.util.regex.Pattern


Similar Threads

  1. Another ascii question....
    By akira220984 in forum New To Java
    Replies: 5
    Last Post: 02-20-2009, 01:38 AM
  2. Converting ASCII format
    By right2001 in forum New To Java
    Replies: 7
    Last Post: 02-17-2009, 03:55 PM
  3. I need help with ascii characters
    By Grandon in forum Eclipse
    Replies: 17
    Last Post: 11-08-2008, 02:12 AM
  4. Ascii code.........
    By Somitesh Chakraborty in forum New To Java
    Replies: 6
    Last Post: 11-04-2008, 05:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts