You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by br...@apache.org on 2004/08/24 16:58:43 UTC

svn commit: rev 36812 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl

Author: bruno
Date: Tue Aug 24 07:58:42 2004
New Revision: 36812

Modified:
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/ModuleSource.java
Log:
sync from trunk
support for byte arrays
Contributed by Ralph Goers (bugzilla 30812)


Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/ModuleSource.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/ModuleSource.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/ModuleSource.java	Tue Aug 24 07:58:42 2004
@@ -145,6 +145,8 @@
             return (InputStream)obj;
         } else if ( obj instanceof String ) {
             return new ByteArrayInputStream( ((String)obj).getBytes() );
+        } else if (obj instanceof byte[]) {
+            return new ByteArrayInputStream((byte[]) obj);
         } else {
             throw new SourceException( "The object type: " + obj.getClass() +
                                        " could not be serialized as a InputStream " + obj );