org.apache.turbine.util

## Class ObjectUtils

- java.lang.Object
- - org.apache.turbine.util.ObjectUtils

-     public abstract class ObjectUtils
      extends Object

  This is where common Object manipulation routines should go.
  Version:
    $Id: ObjectUtils.java 1812628 2017-10-19 12:34:25Z gk $
  Author:
    Nissim Karpenstein, Henning P. Schmiedehausen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ObjectUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `deserialize(byte[] objectData)` Deserializes a single object from an array of bytes.
    `static byte[]` | `serializeMap(Map<String,Object> map)` Converts a map to a byte array for storage/serialization.

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

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

- - ### Constructor Detail

    - #### ObjectUtils

          public ObjectUtils()

  - ### Method Detail

    - #### serializeMap

          public static byte[] serializeMap(Map<String,Object> map)
                                     throws Exception

      Converts a map to a byte array for storage/serialization.
      Parameters:
        `map` - The Map to convert.
      Returns:
        A byte[] with the converted Map.
      Throws:
        `Exception` - A generic exception.

    - #### deserialize

          public static <T> T deserialize(byte[] objectData)

      Deserializes a single object from an array of bytes.
      Parameters:
        `objectData` - The serialized object.
      Returns:
        The deserialized object, or `null` on failure.

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.