cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: rev 36812 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl
Date Tue, 24 Aug 2004 14:58:43 GMT
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
);

Mime
View raw message