code: public static void marshallUUID(UUID uuid, ObjectOutput out, boolean checkNull) throws IOException {
        if (checkNull) {
           if (uuid == null) {
              out.writeBoolean(true);
              return;
           }
           out.writeBoolean(false);
        }
        out.writeLong(uuid.getMostSignificantBits());
        out.writeLong(uuid.getLeastSignificantBits());
     }
docs: Marshall the {@link UUID} by sending the most and lest significant bits.
  <p>
  This method supports {@code null} if {@code checkNull} is set to {@code true}.
  
  @param uuid      {@link UUID} to marshall.
  @param out       {@link ObjectOutput} to write.
  @param checkNull If {@code true}, it checks if {@code uuid} is {@code null}.
  @throws IOException If any of the usual Input/Output related exceptions occur.