public boolean sendViaDataSocket(String string){
  try {
    byte[] bytes=string.getBytes(encoding);
    Log.d(TAG,"Using data connection encoding: " + encoding);
    return sendViaDataSocket(bytes,bytes.length);
  }
 catch (  UnsupportedEncodingException e) {
    Log.e(TAG,"Unsupported encoding for data socket send");
    return false;
  }
}

public boolean sendViaDataSocket ( String string ) { try { byte [ ] bytes = string . getBytes ( encoding ) ; Log . d ( TAG , "Using data connection encoding: " + encoding ) ; return sendViaDataSocket ( bytes , bytes . length ) ; } catch ( UnsupportedEncodingException e ) { Log . e ( TAG , "Unsupported encoding for data socket send" ) ; return false ; } }
sends a string over the already - established data socket
