code: public static UUID unmarshallUUID(ObjectInput in, boolean checkNull) throws IOException {
        if (checkNull && in.readBoolean()) {
           return null;
        }
        return new UUID(in.readLong(), in.readLong());
     }
docs: Unmarshall {@link UUID}.
  
  @param in        {@link ObjectInput} to read.
  @param checkNull If {@code true}, it checks if the {@link UUID} marshalled was {@code null}.
  @return {@link UUID} marshalled.
  @throws IOException If any of the usual Input/Output related exceptions occur.
  @see #marshallUUID(UUID, ObjectOutput, boolean).