net.sf.sail.core.util
Class MarshallUtils

java.lang.Object
  extended by net.sf.sail.core.util.MarshallUtils

public class MarshallUtils
extends java.lang.Object

Handy XML marshalling utilities for SAIL.

Author:
turadg AUDIT07-

Constructor Summary
MarshallUtils()
           
 
Method Summary
static Curnit marshallCycle(Curnit curnit)
           Returns a copy of the argument curnit that has been marshalled and unmarshalled.
static Curnit marshallCycle(Curnit curnit, java.io.OutputStream outputBranch)
           Returns a copy of the argument curnit that has been marshalled and unmarshalled.
static Pod marshallCycle(Pod parentPod)
           
static Pod marshallCycle(Pod pod, java.io.OutputStream outputBranch)
           
static Curnit readCurnit(java.io.InputStream in)
          Reads in a curnit stream and returns a curnit.
static Pod readPod(java.io.InputStream in)
           
static void writeCurnit(Curnit curnit, java.io.OutputStream out)
           
static void writePod(Pod pod, java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshallUtils

public MarshallUtils()
Method Detail

marshallCycle

public static Curnit marshallCycle(Curnit curnit)
                            throws java.io.IOException

Returns a copy of the argument curnit that has been marshalled and unmarshalled. Important for ensuring that everything in the incoming curnit can persist through marshalling.

Parameters:
curnit -
Returns:
a new curnit generated by unmarshalling the marshalled version of the argument curnit
Throws:
java.io.IOException

marshallCycle

public static Curnit marshallCycle(Curnit curnit,
                                   java.io.OutputStream outputBranch)
                            throws java.io.IOException

Returns a copy of the argument curnit that has been marshalled and unmarshalled. Important for ensuring that everything in the incoming curnit can persist through marshalling.

Also tees the output to the argument OutputStream.

Parameters:
curnit -
outputBranch - optional stream to which to tee output
Returns:
a new curnit generated by unmarshalling the marshalled version of the argument curnit
Throws:
java.io.IOException

writeCurnit

public static void writeCurnit(Curnit curnit,
                               java.io.OutputStream out)
                        throws java.io.IOException
Throws:
java.io.IOException

readCurnit

public static Curnit readCurnit(java.io.InputStream in)
Reads in a curnit stream and returns a curnit.

Parameters:
in - - curnit stream
Returns:
a curnit

marshallCycle

public static Pod marshallCycle(Pod pod,
                                java.io.OutputStream outputBranch)
                         throws java.io.IOException
Parameters:
pod -
outputBranch - optional stream to which to tee output
Throws:
java.io.IOException

marshallCycle

public static Pod marshallCycle(Pod parentPod)
                         throws java.io.IOException
Parameters:
parentPod -
Returns:
Throws:
java.io.IOException

readPod

public static Pod readPod(java.io.InputStream in)

writePod

public static void writePod(Pod pod,
                            java.io.OutputStream out)
                     throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2004-2008 TELS Center. All Rights Reserved.