Class DateAdapter


  • public class DateAdapter
    extends com.google.gson.TypeAdapter<java.util.Date>
    TypeAdapter for date representation received from the API (which represents it as a (floating) number of seconds since the Epoch).
    • Constructor Summary

      Constructors 
      Constructor Description
      DateAdapter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date read​(com.google.gson.stream.JsonReader jsonReader)  
      void write​(com.google.gson.stream.JsonWriter jsonWriter, java.util.Date date)  
      • Methods inherited from class com.google.gson.TypeAdapter

        fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateAdapter

        public DateAdapter()
    • Method Detail

      • write

        public void write​(com.google.gson.stream.JsonWriter jsonWriter,
                          java.util.Date date)
                   throws java.io.IOException
        Specified by:
        write in class com.google.gson.TypeAdapter<java.util.Date>
        Throws:
        java.io.IOException
      • read

        public java.util.Date read​(com.google.gson.stream.JsonReader jsonReader)
                            throws java.io.IOException
        Specified by:
        read in class com.google.gson.TypeAdapter<java.util.Date>
        Throws:
        java.io.IOException