1 package org.jboss.cache.marshall;2 3 import org.jboss.util.stream.MarshalledValueInputStream;4 5 import java.io.ByteArrayInputStream ;6 import java.io.IOException ;7 import java.io.ObjectInputStream ;8 import java.io.ObjectOutputStream ;9 import java.io.OutputStream ;10 11 /**12 * @author Clebert Suconic13 * @since 1.4.114 */15 class JavaObjectStreamFactory implements ObjectStreamFactory16 {17 18 public ObjectInputStream createObjectInputStream(byte[] bytes) throws IOException 19 {20 ByteArrayInputStream in = new ByteArrayInputStream (bytes);21 return new MarshalledValueInputStream(in);22 }23 24 public ObjectOutputStream createObjectOutputStream(OutputStream out) throws IOException 25 {26 return new ObjectOutputStream (out);27 }28 29 }30