[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/marshal/http ...
Ron Sigal
ron_sigal at yahoo.com
Thu Sep 21 03:37:03 EDT 2006
User: rsigal
Date: 06/09/21 03:37:03
Modified: src/main/org/jboss/remoting/marshal/http
HTTPUnMarshaller.java
Log:
JBREM-601: If input to write() is binary, pass directly to SerializableUnMarshaller.write().
Revision Changes Path
1.10 +31 -28 JBossRemoting/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: HTTPUnMarshaller.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- HTTPUnMarshaller.java 15 Jul 2006 04:40:10 -0000 1.9
+++ HTTPUnMarshaller.java 21 Sep 2006 07:37:03 -0000 1.10
@@ -59,6 +59,16 @@
*/
public Object read(InputStream inputStream, Map metadata) throws IOException, ClassNotFoundException
{
+ try
+ {
+ if (isBinaryData(metadata))
+ return super.read(inputStream, metadata);
+ }
+ catch (Exception e)
+ {
+ log.warn("Can not get Content-Type from header for http unmarshalling.");
+ }
+
int contentLength = -1;
Object ret = null;
int bufferSize = 1024;
@@ -124,16 +134,9 @@
return null;
}
- boolean isBinary = isBinaryData(metadata);
//boolean isError = isErrorReturn(metadata);
-
//if(isBinary || isError)
- if(isBinary)
- {
- return super.read(new ByteArrayInputStream(totalByteArray), metadata);
- }
- else
- {
+
try
{
@@ -154,7 +157,7 @@
log.error("Can not unmarshall inputstream. Tried to unmarshall as both an object and string type.", e);
throw new IOException("Can not unmarshall inputstream.");
}
- }
+
return ret;
}
More information about the jboss-cvs-commits
mailing list