@HandleClassMetadata @HandleBeanView public static class DefaultConverters.DateConverter extends Object implements Converter<Date>
Constructor and Description |
---|
DateConverter() |
DateConverter(DateFormat dateFormat,
boolean asTimeInMillis) |
Modifier and Type | Method and Description |
---|---|
Date |
deserialize(ObjectReader reader,
Context ctx) |
protected String |
format(Date date) |
protected Date |
read(String dateString) |
void |
serialize(Date obj,
ObjectWriter writer,
Context ctx) |
public DateConverter()
public DateConverter(DateFormat dateFormat, boolean asTimeInMillis)
public void serialize(Date obj, ObjectWriter writer, Context ctx)
serialize
in interface Converter<Date>
serialize
in interface Serializer<Date>
obj
- we want to serialize. The object is of type T or a subclass (if this serializer
has been registered for subclasses).writer
- to use to write data to the output stream.ctx
- the current context.public Date deserialize(ObjectReader reader, Context ctx)
deserialize
in interface Converter<Date>
deserialize
in interface Deserializer<Date>
reader
- used to read data from.ctx
- the current context.protected Date read(String dateString) throws ParseException
ParseException
Copyright © 2019. All rights reserved.