Package com.suse.salt.netapi.parser
Class DateAdapter
- java.lang.Object
-
- com.google.gson.TypeAdapter<Date>
-
- com.suse.salt.netapi.parser.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 Summary
Constructors Constructor Description DateAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
read(com.google.gson.stream.JsonReader jsonReader)
void
write(com.google.gson.stream.JsonWriter jsonWriter, Date date)
-
-
-
Method Detail
-
write
public void write(com.google.gson.stream.JsonWriter jsonWriter, Date date) throws IOException
- Specified by:
write
in classcom.google.gson.TypeAdapter<Date>
- Throws:
IOException
-
read
public Date read(com.google.gson.stream.JsonReader jsonReader) throws IOException
- Specified by:
read
in classcom.google.gson.TypeAdapter<Date>
- Throws:
IOException
-
-