ApplicationReply appReply = message.getApplicationReply();
ApplicationReplyEncoder appEncoder = new ApplicationReplyEncoder();
byte[] encodedAppReply = appEncoder.encode( appReply );
// Build private message bytes
PrivateMessage privateMessage = message.getPrivateMessage();
PrivateMessageEncoder privateEncoder = new PrivateMessageEncoder();
byte[] privateBytes = privateEncoder.encode( privateMessage );
short messageLength = ( short ) ( HEADER_LENGTH + encodedAppReply.length + privateBytes.length );