cascading.flow.hadoop.util

## Class JavaObjectSerializer

- java.lang.Object
- - cascading.flow.hadoop.util.JavaObjectSerializer

- All Implemented Interfaces:
    ObjectSerializer

      public class JavaObjectSerializer
      extends java.lang.Object
      implements ObjectSerializer

  Class JavaObjectSerializer is the default implementation of `ObjectSerializer`.

- - ### Field Summary

    - ### Fields inherited from interface cascading.flow.hadoop.util.ObjectSerializer

      `OBJECT_SERIALIZER_PROPERTY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaObjectSerializer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> boolean` | `accepts(java.lang.Class<T> type)`
    `<T> T` | `deserialize(byte[] bytes, java.lang.Class<T> type, boolean decompress)`
    `<T> java.util.List<T>` | `deserializeList(byte[] bytes, boolean decompress)`
    `<T> java.util.Map<java.lang.String,T>` | `deserializeMap(byte[] bytes, boolean decompress)`
    `<T> byte[]` | `serialize(T object, boolean compress)`
    `<T> byte[]` | `serializeList(java.util.List<T> list, boolean compress)`
    `<T> byte[]` | `serializeMap(java.util.Map<java.lang.String,T> map, boolean compress)`

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

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

- - ### Constructor Detail

    - #### JavaObjectSerializer

          public JavaObjectSerializer()

  - ### Method Detail

    - #### serialize

          public <T> byte[] serialize(T object,
                             boolean compress)
                           throws java.io.IOException

      Specified by:
        `serialize` in interface `ObjectSerializer`
      Throws:
        `java.io.IOException`

    - #### deserialize

          public <T> T deserialize(byte[] bytes,
                          java.lang.Class<T> type,
                          boolean decompress)
                        throws java.io.IOException

      Specified by:
        `deserialize` in interface `ObjectSerializer`
      Throws:
        `java.io.IOException`

    - #### accepts

          public <T> boolean accepts(java.lang.Class<T> type)

      Specified by:
        `accepts` in interface `ObjectSerializer`

    - #### serializeMap

          public <T> byte[] serializeMap(java.util.Map<java.lang.String,T> map,
                                boolean compress)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserializeMap

          public <T> java.util.Map<java.lang.String,T> deserializeMap(byte[] bytes,
                                                             boolean decompress)
                                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### serializeList

          public <T> byte[] serializeList(java.util.List<T> list,
                                 boolean compress)
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserializeList

          public <T> java.util.List<T> deserializeList(byte[] bytes,
                                              boolean decompress)
                                            throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.