public class TimestampEncoding
extends org.apache.avro.reflect.CustomEncoding<com.google.cloud.Timestamp>
| Constructor and Description |
|---|
TimestampEncoding() |
| Modifier and Type | Method and Description |
|---|---|
protected com.google.cloud.Timestamp |
read(java.lang.Object reuse,
org.apache.avro.io.Decoder in)
Deserializes a
Timestamp from the given Decoder. |
protected void |
write(java.lang.Object datum,
org.apache.avro.io.Encoder out)
Serializes a
Timestamp received as datum to the output encoder out. |
protected void write(java.lang.Object datum,
org.apache.avro.io.Encoder out)
throws java.io.IOException
Timestamp received as datum to the output encoder out. A null timestamp is
serialized with negative fields (seconds and nanos).write in class org.apache.avro.reflect.CustomEncoding<com.google.cloud.Timestamp>datum - the Timestamp to be encodedout - the Encoder where the timestamp should be serialized tojava.io.IOException - if it was not possible to write the timestamp into the provided encoderprotected com.google.cloud.Timestamp read(java.lang.Object reuse,
org.apache.avro.io.Decoder in)
throws java.io.IOException
Timestamp from the given Decoder.read in class org.apache.avro.reflect.CustomEncoding<com.google.cloud.Timestamp>reuse - ignoredin - the Decoder to read the timestamp fields fromTimestamp instead.java.io.IOException - if it was not possible to read the timestamp from the provided decoder