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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -