Results 1 to 2 of 2
Thread: Getting ascii from a String
- 03-07-2009, 07:36 AM #1Member
- Join Date
- Feb 2009
- Rep Power
Getting ascii from a String
Below are lines of codes how I get the data from serial port.
byte readBuffer = new byte;
int numBytes = inputStream.read(readBuffer);
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.
- 03-07-2009, 11:11 AM #2
- By akira220984 in forum New To JavaReplies: 5Last Post: 02-20-2009, 02:38 AM
- By right2001 in forum New To JavaReplies: 7Last Post: 02-17-2009, 04:55 PM
- By Grandon in forum EclipseReplies: 17Last Post: 11-08-2008, 03:12 AM
- By Somitesh Chakraborty in forum New To JavaReplies: 6Last Post: 11-04-2008, 06:32 PM