org.vfny.geoserver.responses
Class XmlOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.ByteArrayOutputStream
          extended byorg.vfny.geoserver.responses.XmlOutputStream

public class XmlOutputStream
extends java.io.ByteArrayOutputStream

Smart ByteArray to store XML values and offers convenient methods for writing XML and file values to the stream.


Field Summary
 
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
 
Constructor Summary
XmlOutputStream()
          Empty constructor, calls super.
XmlOutputStream(int length)
          Constructor with XML length set.
 
Method Summary
 void writeFile(java.lang.String inputFileName)
          Writes file contents directly to XML output stream.
 void writeToClean(java.io.OutputStream xmlOut)
          Writes XML output to XML final, stripping XML encoding preamble.
 void writeToNormal(java.io.OutputStream xmlOut)
          Writes XML output directly, with no modification, to XML final.
 
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlOutputStream

public XmlOutputStream()
Empty constructor, calls super.


XmlOutputStream

public XmlOutputStream(int length)
Constructor with XML length set.

Parameters:
length - The column/XML tag name.
Method Detail

writeToClean

public void writeToClean(java.io.OutputStream xmlOut)
                  throws WfsException
Writes XML output to XML final, stripping XML encoding preamble.

Parameters:
xmlOut - XML output to write to XML final.
Throws:
WfsException - For IOExceptions

writeToNormal

public void writeToNormal(java.io.OutputStream xmlOut)
                   throws WfsException
Writes XML output directly, with no modification, to XML final.

Parameters:
xmlOut - XML output to write to XML final.
Throws:
WfsException - For IOExceptions

writeFile

public void writeFile(java.lang.String inputFileName)
               throws WfsException
Writes file contents directly to XML output stream.

Parameters:
inputFileName - File to write to XML stream.
Throws:
WfsException - For IOExceptions