| Constructor and Description |
|---|
ObjectWritableCodec(Class<? extends T> clazz)
Create a new codec for Hadoop Writables.
|
public ObjectWritableCodec(Class<? extends T> clazz)
clazz - we need it to invoke the class constructor.public byte[] encode(T writable)
encode in interface Encoder<T extends org.apache.hadoop.io.Writable>writable - the object to encode.RemoteRuntimeException - if serialization fails.public T decode(byte[] buffer)
decode in interface Decoder<T extends org.apache.hadoop.io.Writable>buffer - serialized version of the Writable object (as a byte array).RemoteRuntimeException - if deserialization fails.Copyright © 2017 The Apache Software Foundation. All rights reserved.