The byte array holds what was read.
Provide access to that array to the other class.
Type: Posts; User: Norm
The byte array holds what was read.
Provide access to that array to the other class.
Read the API doc for the classes in the javax.comm package.
Define a large array and use an index to store the bytes into the array.
Those look like the characters 1 thru 8.
What is the next step?
When does the reading method decide it has all the bytes for a String so that it can create and return a String?
What is printed if you use the read() method and print out what is read?
while (inputStream.available()>0) {
int aByte= inputStream.read(); // read a byte
...
Could you show the code you used to read and to print with?
the read() method returns an int. The character '1' should print as 49
Don't use an array or convert the input to a String.
read...
There could be some confusion here. I assume that each number you send is a digit character that takes 8 bits. The 8 bits and 5 digits and 3 more numbers are not the right way to look at what is...