@Override public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); if (data != null) { out.writeObject(SerializeUtils.ByteBufferToByteArray(data)); } else { out.writeObject(null); } }