Walter Gabrielsen Iii wrote:I'm not sure if I understand the question correctly, so correct me if I'm wrong.
Though I don't know if it is even possible since I don't know about sms, My thought is that maybe the best way to transfer the contents of a file here is for Java on the mobile to somehow open an IO input connection stream through the serial cable to the PC and then connect that to an outbound SMS connection through the wireless network connection. Then, just do a read/write cycle until it reaches the end of the file and post that to the SMS connection.
Srinath Gamage wrote:hi,
Search for gammu. It includes a SMS Daemon which can be used to SMS through the connected phone.
After getting it configured, just only a matter of calling command line utility with right parameters.
Winston Gutkowski wrote:
Sana Bokhari wrote:hey i am reading a file byte by byte..., then storing it in a byte array and lastly converting it to a string...
First mistake. Bytes and characters are not the same thing. They can be converted; though this is usually done by using either
(a) a BufferedReader, or
(b) one of the String constructors that takes a byte array.
but this really only works if what you are reading in is text. If it's binary, you really DON'T want a String.
but i want to convert values on every index of the byte array individually..... i.e. what ever bytes i have on index one should be converted to string.....
And here's where my confusion starts. Are you saying that if you read in a byte that contains an ascii 'a', you want it to print out as '97'?
Because that's what your code will do.
Furthermore, if you simply concatenate all those numbers together, you will never be able to get your original values back, because the strings produced may be of different lengths. You could zero-fill them to some uniform length, but it seems like an awful lot of "noise code" to me.
My suggestion is this: back up and explain exactly what it is you're trying to do (NOT what you've done) and why. That might help us suggest a solution.
Also: provide some examples of what you want, because at the moment your requirements mystify me.