KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > marshall > dynamic > local > TestMarshaller


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.remoting.marshall.dynamic.local;
8
9 import org.jboss.remoting.marshal.serializable.SerializableMarshaller;
10
11 import java.io.IOException JavaDoc;
12 import java.io.OutputStream JavaDoc;
13
14 /**
15  * @author <a HREF="mailto:tom.elrod@jboss.com">Tom Elrod</a>
16  */

17 public class TestMarshaller extends SerializableMarshaller
18 {
19    public final static String JavaDoc DATATYPE = "test";
20
21    //private TestWrapper wrapper = null;
22

23    /**
24     * Take the data object and write to the output. Has ben customized
25     * for working with ObjectOutputStreams since requires extra messaging.
26     *
27     * @param dataObject Object to be writen to output
28     * @param output The data output to write the object
29     * data to.
30     */

31    public void write(Object JavaDoc dataObject, OutputStream JavaDoc output) throws IOException JavaDoc
32    {
33       TestWrapper wrapper = new TestWrapper(dataObject);
34       super.write(wrapper, output);
35    }
36
37    public String JavaDoc getDataType()
38    {
39       return DATATYPE;
40    }
41 }
Popular Tags