Example usage for org.apache.commons.lang3 ExtendedSerializationUtils deserialize

List of usage examples for org.apache.commons.lang3 ExtendedSerializationUtils deserialize

Introduction

In this page you can find the example usage for org.apache.commons.lang3 ExtendedSerializationUtils deserialize.

Prototype

public static final <T> T deserialize(Class<T> objType, byte[] objectData) 

Source Link

Usage

From source file:org.springframework.format.base64.Base64StringToObjectConverter.java

@Override
public T convert(String source) {
    if (StringUtils.isEmpty(source)) {
        return null;
    }//from   ww  w . j  a v  a 2s .com

    byte[] bytes = Base64.decodeBase64(source);
    T obj = ExtendedSerializationUtils.deserialize(getTargetType(), bytes);
    return obj;
}