Class DateAdapter


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

      • DateAdapter

        public DateAdapter()
    • Method Detail

      • write

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

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