Socket socket = new Socket(add, port); socket.setTcpNoDelay(true); cipherEn = Cipher.getInstance(SYM_ALGORITHM); cipherEn.init(Cipher.ENCRYPT_MODE, secretKey); cout = new CipherOutputStream(out, cipherEn); public void sendMessage(String message) { byte[] m = new byte[SIZE]; byte[] temp = message.getBytes(); int last = 0; for(int i=0; i