} else {
log.debug("Encrypting buffer: {}", message);
byte[] plain = new byte[message.remaining()];
message.get(plain);
message.clear();
message.free();
//encrypt and write
byte[] encrypted = cipher.update(plain);
IoBuffer messageEncrypted = IoBuffer.wrap(encrypted);
log.debug("Encrypted buffer: {}", messageEncrypted);
nextFilter.filterWrite(session, new EncryptedWriteRequest(request, messageEncrypted));