[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/marshal/compress ...
Ron Sigal
ron_sigal at yahoo.com
Tue Nov 20 21:34:02 EST 2007
User: rsigal
Date: 07/11/20 21:34:02
Modified: src/main/org/jboss/remoting/marshal/compress Tag:
remoting_2_x CompressingUnMarshaller.java
Log:
JBREM-677: (1) Added getMarshallingStream(); (2) uses BufferedInputStream.
Revision Changes Path
No revision
No revision
1.6.4.2 +12 -2 JBossRemoting/src/main/org/jboss/remoting/marshal/compress/CompressingUnMarshaller.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CompressingUnMarshaller.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/marshal/compress/CompressingUnMarshaller.java,v
retrieving revision 1.6.4.1
retrieving revision 1.6.4.2
diff -u -b -r1.6.4.1 -r1.6.4.2
--- CompressingUnMarshaller.java 19 May 2007 02:21:44 -0000 1.6.4.1
+++ CompressingUnMarshaller.java 21 Nov 2007 02:34:02 -0000 1.6.4.2
@@ -25,11 +25,14 @@
import org.jboss.remoting.marshal.UnMarshaller;
import org.jboss.remoting.marshal.VersionedUnMarshaller;
import org.jboss.remoting.marshal.serializable.SerializableUnMarshaller;
+import org.jboss.remoting.serialization.SerializationManager;
import org.jboss.remoting.serialization.SerializationStreamFactory;
+import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
+import java.io.OutputStream;
import java.util.Map;
import java.util.zip.GZIPInputStream;
@@ -49,7 +52,7 @@
* uses an <code>HTTPUnMarshaller</code> to restore an uncompressed input stream.
*
* @author <a href="mailto:r.sigal at computer.org">Ron Sigal</a>
- * @version $Revision: 1.6.4.1 $
+ * @version $Revision: 1.6.4.2 $
* <p/>
* Copyright (c) 2005
* </p>
@@ -81,6 +84,11 @@
wrappedUnMarshaller = unMarshaller;
}
+ public InputStream getMarshallingStream(InputStream inputStream) throws IOException
+ {
+ return inputStream;
+ }
+
/**
* Restores a compressed, marshalled form of an object to its original state.
*
@@ -95,7 +103,9 @@
public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException
{
GZIPInputStream gzis = new GZIPInputStream(inputStream);
- ObjectInputStream ois = SerializationStreamFactory.getManagerInstance(getSerializationType()).createRegularInput(gzis);
+ BufferedInputStream bis = new BufferedInputStream(gzis);
+ SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
+ ObjectInputStream ois = manager.createInput(bis, customClassLoader);
if(wrappedUnMarshaller != null)
{
More information about the jboss-cvs-commits
mailing list