org.apache.ignite.binary

## Interface BinarySerializer

All Known Implementing Classes:
  BinaryReflectiveSerializer

    public interface BinarySerializer

Interface that allows to implement custom serialization logic for binary objects. Can be used instead of `Binarylizable` in case if the class cannot be changed directly.

Binary serializer can be configured for all binary objects via `BinaryConfiguration.getSerializer()` method, or for a specific binary type via `BinaryTypeConfiguration.getSerializer()` method.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `readBinary(Object obj, BinaryReader reader)` Reads fields from provided reader.
`void` `writeBinary(Object obj, BinaryWriter writer)` Writes fields to provided writer.

### Method Detail

#### writeBinary

    void writeBinary(Object obj,
                     BinaryWriter writer)
              throws BinaryObjectException

Writes fields to provided writer.

Parameters:
  `obj` - Empty object.
  `writer` - Binary object writer.
Throws:
  `BinaryObjectException` - In case of error.

#### readBinary

    void readBinary(Object obj,
                    BinaryReader reader)
             throws BinaryObjectException

Reads fields from provided reader.

Parameters:
  `obj` - Empty object
  `reader` - Binary object reader.
Throws:
  `BinaryObjectException` - In case of error.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019