KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > 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.test.remoting.marshall.dynamic.local;
8
9 import java.io.IOException JavaDoc;
10 import java.io.OutputStream JavaDoc;
11 import org.jboss.remoting.marshal.serializable.SerializableMarshaller;
12
13 /**
14  * @author <a HREF="mailto:tom.elrod@jboss.com">Tom Elrod</a>
15  */

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

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

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