Package nexj.core.rpc

Examples of nexj.core.rpc.CharacterStreamMarshaller


    * @param ostream The object dump output stream.
    * @param obj The object to write.
    */
   protected void output(OutputStream ostream, Object obj) throws Exception
   {
      CharacterStreamMarshaller msh = (CharacterStreamMarshaller)Class.forName(m_sMarshallerClassName)
         .getConstructor(new Class[]{Context.class})
         .newInstance(new Object[]{m_context});

      if (msh instanceof TextMarshaller)
      {
         ((TextMarshaller)msh).setVersion(3);
      }

      if (m_bCompressed)
      {
         ostream = new GZIPOutputStream(new NoCloseOutputStream(ostream));
      }

      Writer writer = IOUtil.openBufferedWriter(ostream, XMLUtil.ENCODING);

      msh.serialize(obj, writer);

      writer.close();
   }
View Full Code Here

TOP

Related Classes of nexj.core.rpc.CharacterStreamMarshaller

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.