org.apache.axis2.jaxws.message.util
Class Reader2Writer

java.lang.Object
  extended by org.apache.axis2.jaxws.message.util.Reader2Writer

public class Reader2Writer
extends Object

Reader2Writer This is a simple converter that is constructed with an XMLStreamReader and allows you to write the contents to an XMLStreamWriter.


Constructor Summary
Reader2Writer(XMLStreamReader reader)
          Construct from a Reader
Reader2Writer(XMLStreamReader reader, boolean closeReader)
          Construct from a Reader
 
Method Summary
 String getAsString()
          Utility method to write the reader contents to a String
 void outputTo(XMLStreamWriter writer)
          outputTo the writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reader2Writer

public Reader2Writer(XMLStreamReader reader)
Construct from a Reader

Parameters:
reader - -- the input to the converter

Reader2Writer

public Reader2Writer(XMLStreamReader reader,
                     boolean closeReader)
Construct from a Reader

Parameters:
reader - -- the input to the converter
closeReader - -- close the reader upon completion
Method Detail

outputTo

public void outputTo(XMLStreamWriter writer)
              throws XMLStreamException
outputTo the writer.

Parameters:
writer - -- the output of the converter
Throws:
XMLStreamException

getAsString

public String getAsString()
                   throws XMLStreamException
Utility method to write the reader contents to a String

Returns:
String
Throws:
XMLStreamException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.