org.apache.directory.mavibot.btree.serializer

## Class CharArraySerializer

- java.lang.Object
- - org.apache.directory.mavibot.btree.serializer.AbstractElementSerializer<char[]>
  - - org.apache.directory.mavibot.btree.serializer.CharArraySerializer

- All Implemented Interfaces:
    ElementSerializer<char[]>

      public class CharArraySerializer
      extends AbstractElementSerializer<char[]>

  A serializer for a char[].
  Author:
    Apache Directory Project

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CharArraySerializer` | `INSTANCE` A static instance of a CharArraySerializer

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `char[]` | `deserialize(BufferHandler bufferHandler)` Deserialize an element from a BufferHandler
    `static char[]` | `deserialize(byte[] in)` A static method used to deserialize a char array from a byte array.
    `char[]` | `deserialize(ByteBuffer buffer)` Deserialize an element from a ByteBuffer
    `char[]` | `fromBytes(byte[] in)` A method used to deserialize a char array from a byte array.
    `char[]` | `fromBytes(byte[] in, int start)` A method used to deserialize a char array from a byte array.
    `byte[]` | `serialize(char[] element)` Produce the byte[] representation of the element

    - ### Methods inherited from class org.apache.directory.mavibot.btree.serializer.AbstractElementSerializer

      `compare, getComparator, getType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final CharArraySerializer INSTANCE

      A static instance of a CharArraySerializer

  - ### Method Detail

    - #### serialize

          public byte[] serialize(char[] element)

      Produce the byte[] representation of the element
      Parameters:
        `element` - The element to serialize
      Returns:
        The byte[] containing the serialized element

    - #### deserialize

          public static char[] deserialize(byte[] in)

      A static method used to deserialize a char array from a byte array.
      Parameters:
        `in` - The byte array containing the char array
      Returns:
        A char[]

    - #### fromBytes

          public char[] fromBytes(byte[] in,
                         int start)

      A method used to deserialize a char array from a byte array.
      Parameters:
        `in` - The byte array containing the char array
      Returns:
        A char[]

    - #### fromBytes

          public char[] fromBytes(byte[] in)

      A method used to deserialize a char array from a byte array.
      Parameters:
        `in` - The byte array containing the char array
      Returns:
        A char[]

    - #### deserialize

          public char[] deserialize(BufferHandler bufferHandler)
                             throws IOException

      Deserialize an element from a BufferHandler
      Parameters:
        `bufferHandler` - The incoming bufferHandler
      Returns:
        The deserialized element
      Throws:
        `IOException` - If the deserialization failed

    - #### deserialize

          public char[] deserialize(ByteBuffer buffer)
                             throws IOException

      Deserialize an element from a ByteBuffer
      Parameters:
        `buffer` - The incoming ByteBuffer
      Returns:
        The deserialized element
      Throws:
        `IOException` - If the deserialization failed

Copyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.