public class DateUnixtimeMillisTypeAdapter extends com.google.gson.TypeAdapter<Date>
| Constructor and Description |
|---|
DateUnixtimeMillisTypeAdapter(boolean allowNegativeTimestamp) |
| Modifier and Type | Method and Description |
|---|---|
protected Date |
fromTimestamp(long timestamp) |
Date |
read(com.google.gson.stream.JsonReader in) |
protected long |
toTimestamp(Date date) |
void |
write(com.google.gson.stream.JsonWriter out,
Date value) |
public DateUnixtimeMillisTypeAdapter(boolean allowNegativeTimestamp)
public final void write(com.google.gson.stream.JsonWriter out,
Date value)
throws IOException
write in class com.google.gson.TypeAdapter<Date>IOExceptionpublic final Date read(com.google.gson.stream.JsonReader in) throws IOException
read in class com.google.gson.TypeAdapter<Date>IOExceptionprotected long toTimestamp(Date date)
protected Date fromTimestamp(long timestamp)
Copyright © 2015. All rights reserved.