if (SessionLog.isDebugEnabled(session)) {
SessionLog.debug(session, " encrypt: " + buf);
}
int pos = buf.position();
handler.encrypt(buf.buf());
buf.position(pos);
ByteBuffer encryptedBuffer = new EncryptedBuffer(SSLHandler
.copy(handler.getOutNetBuffer()), buf);
if (SessionLog.isDebugEnabled(session)) {