Example usage for org.springframework.batch.core.repository.dao XStreamExecutionContextStringSerializer deserialize

List of usage examples for org.springframework.batch.core.repository.dao XStreamExecutionContextStringSerializer deserialize

Introduction

In this page you can find the example usage for org.springframework.batch.core.repository.dao XStreamExecutionContextStringSerializer deserialize.

Prototype

@SuppressWarnings("unchecked")
@Override
public Map<String, Object> deserialize(InputStream in) throws IOException 

Source Link

Document

Deserializes the supplied input stream into a new execution context.

Usage

From source file:io.spring.batch.xstream.SerializationTest.java

@Test
public void testDeserialization() throws Exception {
    XStreamExecutionContextStringSerializer serializer = new XStreamExecutionContextStringSerializer();
    serializer.afterPropertiesSet();/* w  ww.  j ava 2s  .  com*/

    serializer
            .deserialize(new ByteArrayInputStream(EXAMPLE_EXECUTION_CONTEXT.getBytes(StandardCharsets.UTF_8)));
}