1 16 package org.apache.cocoon.components.xscript; 17 18 import java.io.ByteArrayInputStream ; 19 import java.io.IOException ; 20 import java.io.InputStream ; 21 22 30 public class XScriptObjectResult extends XScriptObject { 31 34 String content; 35 36 public XScriptObjectResult(XScriptManager manager, String content) { 37 super(manager); 38 this.content = content; 39 } 40 41 public InputStream getInputStream() throws IOException { 42 return new ByteArrayInputStream (content.getBytes()); 43 } 44 45 public long getContentLength() { 46 return content.length(); 47 } 48 49 public String getURI() { 50 return "file:/"; 52 } 53 54 public String toString() { 55 return "XScriptObjectResult: " + content; 56 } 57 } 58 | Popular Tags |