Top Description Fields Constructors Methods
org.apache.avro.reflect

public Class DateAsLongEncoding

extends CustomEncoding<Date>
Class Inheritance
Imports
java.io.IOException, java.util.Date, org.apache.avro.Schema, org.apache.avro.io.Decoder, .Encoder

This encoder/decoder writes a java.util.Date object as a long to avro and reads a Date object from long. The long stores the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the Date object.

Field Summary

Inherited from org.apache.avro.reflect.CustomEncoding:
schema

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final Date
protected final void
Inherited from org.apache.avro.reflect.CustomEncoding:
getSchemaread

Constructor Detail

DateAsLongEncodingback to summary
public DateAsLongEncoding()

Method Detail

readback to summary
protected final Date read(Object reuse, Decoder in) throws IOException

Implements abstract org.apache.avro.reflect.CustomEncoding.read.

Annotations
@Override
writeback to summary
protected final void write(Object datum, Encoder out) throws IOException

Implements abstract org.apache.avro.reflect.CustomEncoding.write.

Annotations
@Override