public void sendPacketToDevice(String message){
  if (message == null) {
    return;
  }
  out.println(message + newLine);
  if (log.isDebugEnabled()) {
    String s=message + "                    ";
    s=s.substring(0,Math.max(message.length(),20));
    log.debug("Sent: " + s + "  to  "+ getName()+ device.getRemoteSocketAddress());
  }
}

public void sendPacketToDevice ( String message ) { if ( message == null ) { return ; } out . println ( message + newLine ) ; if ( log . isDebugEnabled ( ) ) { String s = message + "                    " ; s = s . substring ( 0 , Math . max ( message . length ( ) , 20 ) ) ; log . debug ( "Sent: " + s + "  to  " + getName ( ) + device . getRemoteSocketAddress ( ) ) ; } }
called by various controllers to send a string message to a connected device . appends a newline to the end .
