Class CharSerializer

java.lang.Object
org.ehcache.impl.serialization.CharSerializer
All Implemented Interfaces:
org.ehcache.spi.serialization.Serializer<Character>

public class CharSerializer extends Object implements org.ehcache.spi.serialization.Serializer<Character>
Default Serializer for Char type. Simply writes the char value to a byte buffer.
  • Constructor Details

    • CharSerializer

      public CharSerializer()
      No arg constructor
    • CharSerializer

      public CharSerializer(ClassLoader classLoader)
      Constructor to enable this serializer as a transient one.

      Parameter is ignored as Character is a base java type.

      Parameters:
      classLoader - the classloader to use
      See Also:
      • Serializer
  • Method Details

    • serialize

      public ByteBuffer serialize(Character object)
      Specified by:
      serialize in interface org.ehcache.spi.serialization.Serializer<Character>
    • read

      public Character read(ByteBuffer binary)
      Specified by:
      read in interface org.ehcache.spi.serialization.Serializer<Character>
    • equals

      public boolean equals(Character object, ByteBuffer binary)
      Specified by:
      equals in interface org.ehcache.spi.serialization.Serializer<Character>