public boolean sendTextMessage(String text,String contentType){
  if (!NgnStringUtils.isNullOrEmpty(contentType)) {
    super.addHeader("Content-Type",contentType);
  }
 else {
    super.addHeader("Content-Type",NgnContentType.TEXT_PLAIN);
  }
  byte[] bytes=text.getBytes();
  ByteBuffer payload=ByteBuffer.allocateDirect(bytes.length);
  payload.put(bytes);
  return mSession.send(payload,payload.capacity());
}

public boolean sendTextMessage ( String text , String contentType ) { if ( ! NgnStringUtils . isNullOrEmpty ( contentType ) ) { super . addHeader ( "Content-Type" , contentType ) ; } else { super . addHeader ( "Content-Type" , NgnContentType . TEXT_PLAIN ) ; } byte [ ] bytes = text . getBytes ( ) ; ByteBuffer payload = ByteBuffer . allocateDirect ( bytes . length ) ; payload . put ( bytes ) ; return mSession . send ( payload , payload . capacity ( ) ) ; }
send plain text message using sip message request
