public static Date readDate(DataInput in) throws IOException {
    InternalDataSerializer.checkIn(in);

    long time = in.readLong();
    Date date = null;
    if (time != -1L) {
      date = new Date(time);
    }

    if (logger.isTraceEnabled(LogMarker.SERIALIZER_VERBOSE)) {
      logger.trace(LogMarker.SERIALIZER_VERBOSE, "Read Date {}", date);
    }

    return date;
  }
Reads an instance of <code>Date</code> from a <code>DataInput</code>. The return value may be
<code>null</code>.

@param in the {@link DataInput} to read from
@return the deserialized <code>Date</code>

@throws IOException A problem occurs while reading from <code>in</code>
geode-core/src/main/java/org/apache/geode/DataSerializer.java