com.hazelcast.nio.serialization

## Interface ByteArraySerializer<T>

- Type Parameters:
    `T` - type of serialized object
  All Superinterfaces:
    Serializer

      public interface ByteArraySerializer<T>
      extends Serializer

  For sample usage custom serialization and other way of custom serialization see `StreamSerializer`. Note that read and write methods should be compatible

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `read(byte[] buffer)` Converts given byte array to object
    `byte[]` | `write(T object)` Converts given object to byte array

    - ### Methods inherited from interface com.hazelcast.nio.serialization.Serializer

      `destroy, getTypeId`

- - ### Method Detail

    - #### write

          byte[] write(T object)
                throws IOException

      Converts given object to byte array
      Parameters:
        `object` - that will be serialized
      Returns:
        byte array that object is serialized into
      Throws:
        `IOException`

    - #### read

          T read(byte[] buffer)
          throws IOException

      Converts given byte array to object
      Parameters:
        `buffer` - that object will be read from
      Returns:
        deserialized object
      Throws:
        `IOException`

Copyright © 2020. All rights reserved.