diff --git a/spring-integration-core/src/main/java/org/springframework/commons/serializer/DeserializationFailureException.java b/spring-integration-core/src/main/java/org/springframework/commons/serializer/DeserializationFailureException.java
new file mode 100644
index 0000000000..4938bfef0e
--- /dev/null
+++ b/spring-integration-core/src/main/java/org/springframework/commons/serializer/DeserializationFailureException.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.commons.serializer;
+
+/**
+ * @author Gary Russell
+ * @since 2.0
+ *
+ */
+@SuppressWarnings("serial")
+public class DeserializationFailureException extends SerializationException {
+
+ /**
+ * Construct a DeserializationException with the specified detail message.
+ * @param msg the detail message
+ */
+ public DeserializationFailureException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Construct a DeserializationFailureException with the specified detail message
+ * and nested exception.
+ * @param msg the detail message
+ * @param cause the nested exception
+ */
+ public DeserializationFailureException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+
+}
diff --git a/spring-integration-core/src/main/java/org/springframework/commons/serializer/InputStreamingConverter.java b/spring-integration-core/src/main/java/org/springframework/commons/serializer/InputStreamingConverter.java
new file mode 100644
index 0000000000..4c9bbcf3af
--- /dev/null
+++ b/spring-integration-core/src/main/java/org/springframework/commons/serializer/InputStreamingConverter.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.commons.serializer;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * An standard interface to convert from data in an InputStream to
+ * an Object.
+ *
+ * @author Gary Russell
+ * @since 2.0
+ *
+ */
+public interface InputStreamingConverter {
+
+ /**
+ * Read (assemble an object of type T) from an InputStream.
+ * @param is The InputStream.
+ * @return The object.
+ * @throws IOException
+ */
+ public T convert(InputStream inputStream) throws IOException;
+
+}
diff --git a/spring-integration-core/src/main/java/org/springframework/commons/serializer/JavaDeserializingConverter.java b/spring-integration-core/src/main/java/org/springframework/commons/serializer/JavaDeserializingConverter.java
new file mode 100644
index 0000000000..9480df1745
--- /dev/null
+++ b/spring-integration-core/src/main/java/org/springframework/commons/serializer/JavaDeserializingConverter.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.commons.serializer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+import org.springframework.core.convert.converter.Converter;
+
+/**
+ * Delegates to a {@link JavaSerializationConverter} to deserialize data
+ * in a byte[] to an object.
+ *
+ * @author Gary Russell
+ * @since 2.0
+ *
+ */
+public class JavaDeserializingConverter implements Converter {
+
+ private JavaSerializationConverter converter = new JavaSerializationConverter();
+
+ public Object convert(byte[] source) {
+ ByteArrayInputStream byteStream = new ByteArrayInputStream(source);
+ try {
+ return converter.convert(byteStream);
+ }
+ catch (Exception e) {
+ try {
+ byteStream.close();
+ } catch (IOException e1) { }
+ throw new DeserializationFailureException(
+ "Failed to deserialize payload. Is the byte array a result of Object serialization?", e);
+ }
+ }
+
+
+}
diff --git a/spring-integration-core/src/main/java/org/springframework/commons/serializer/JavaSerializationConverter.java b/spring-integration-core/src/main/java/org/springframework/commons/serializer/JavaSerializationConverter.java
new file mode 100644
index 0000000000..6c8c23771b
--- /dev/null
+++ b/spring-integration-core/src/main/java/org/springframework/commons/serializer/JavaSerializationConverter.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.commons.serializer;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+
+
+/**
+ * Converter that implements both input and output streaming using Java
+ * Serialization.
+ *
+ * @author Gary Russell
+ * @since 2.0
+ *
+ */
+public class JavaSerializationConverter
+ implements InputStreamingConverter