Show / Hide Table of Contents

Interface ICodec

An ICodec provides an interception point for any specific code that needs to be executed pre or post (de)serialization. In the case of deserialization this could be to return a concrete implementation and with serialization this could be to explicitly call a specific method on IPofWriter that is not carried out by WriteObject(int, object).

Namespace: Tangosol.IO.Pof.Reflection
Assembly: Coherence.dll
Syntax
public interface ICodec

Methods

Decode(IPofReader, int)

Deserialize an object from the provided IPofReader. Implementing this interface allows introducing specific return implementations.

Declaration
object Decode(IPofReader reader, int index)
Parameters
Type Name Description
IPofReader reader

The IPofReader to read from.

int index

The index of the POF property to deserialize.

Returns
Type Description
object

A specific implementation of the POF property.

Exceptions
Type Condition
IOException

If an I/O error occurs.

Encode(IPofWriter, int, object)

Serialize an object using the provided IPofWriter.

Declaration
void Encode(IPofWriter writer, int index, object value)
Parameters
Type Name Description
IPofWriter writer

The IPofWriterto read from.

int index

The index of the POF property to serialize.

object value

The value to serialize.

Exceptions
Type Condition
IOException

If an I/O error occurs.

In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.