1 7 package org.jboss.remoting.marshal.http; 8 9 import java.io.IOException ; 10 import java.io.OutputStream ; 11 import org.jboss.remoting.marshal.Marshaller; 12 import org.jboss.remoting.marshal.serializable.SerializableMarshaller; 13 14 17 public class HTTPMarshaller extends SerializableMarshaller 18 { 19 static final long serialVersionUID = -51801299849879386L; 20 21 public final static String DATATYPE = "http"; 22 23 33 public void write(Object dataObject, OutputStream output) throws IOException 34 { 35 if(dataObject instanceof String ) 36 { 37 output.write(((String ) dataObject).getBytes()); 38 output.flush(); 39 } 40 else 41 { 42 super.write(dataObject, output); 43 } 44 } 45 46 public Marshaller cloneMarshaller() throws CloneNotSupportedException 47 { 48 return new HTTPMarshaller(); 49 } 50 } | Popular Tags |