java - why do we need to convert number value in string value to send it by bluetooth -


i know why need convert number value (int, double...) in string value send or bluetooth example.

in java, use:

 byte[] buffer= new byte  int bytes  string strreceived=new string (buffer,0, bytes) 

but possbile value bluetooth type ? :

 int received = new integer(...) 

edit : want send data bluetooth, problem if need send string data bluetooth, 1 character = 1 bytes , data 10 digits convert in string 10 bytes. if can send/get directly data in double/int format, can win 6 bytes each data (int/double 4 bits).

thanks !


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -