private void writeSize(EzyByteBuffer buffer, EzyMessage message) { if (message.hasBigSize()) { buffer.putInt(message.getSize()); } else { buffer.putShort((short)message.getSize()); } }