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 09:50:50 UTC

svn commit: rev 36809 - cocoon/trunk/src/java/org/apache/cocoon/components/source/impl

Author: bruno
Date: Tue Aug 24 00:50:49 2004
New Revision: 36809

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


Modified: cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/ModuleSource.java
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/ModuleSource.java	(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/ModuleSource.java	Tue Aug 24 00:50:49 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 );