public class DurationAdapter
extends TypeAdapter<Duration>
| Constructor and Description |
|---|
DurationAdapter() |
| Modifier and Type | Method and Description |
|---|---|
Duration |
read(JsonReader reader)
Reads a Duration object.
|
static Class<Duration> |
serializingClass()
Gets the Class that this adapter serializes.
|
void |
write(JsonWriter writer,
Duration value)
Writes a Duration object.
|
public static Class<Duration> serializingClass()
public Duration read(JsonReader reader)
throws IOException
read in class TypeAdapter<Duration>reader - the JSON reader to read from.IOException - if the Duration can not be parsed.public void write(JsonWriter writer,
Duration value)
throws IOException
write in class TypeAdapter<Duration>writer - the JSON writer to write to.value - the Duration object to write.IOExceptionCopyright © 2014-2016 NetApp, Inc. All Rights Reserved.