This method of the XMLInputStream class constructs an XMLOutputStream with the appropriate initial state. XMLOutputStream objects should always be created using this method for the output stream to mimic the input stream.
public XMLOutputStream createOutputStream(OutputStream out);
Returns a correctly initialized XMLOutputStream for use with the current XMLInputStream.
out | The output stream to base the XMLOutputStream object on. |