/** * Create a new Writer with XML encoding detection rules. * * @param out not null output stream. * @return an XML writer instance for the output stream. * @throws IOException if any. * @see XmlStreamWriter */ public static XmlStreamWriter newXmlWriter( OutputStream out ) throws IOException { return new XmlStreamWriter( out ); }
public void write( char[] cbuf, int off, int len ) throws IOException { if ( xmlPrologWriter != null ) { detectEncoding( cbuf, off, len ); } else { writer.write( cbuf, off, len ); } }
/** * Create a new Writer with XML encoding detection rules. * * @param file not null file. * @return an XML writer instance for the output file. * @throws IOException if any. * @see XmlStreamWriter */ public static XmlStreamWriter newXmlWriter( File file ) throws IOException { return new XmlStreamWriter( file ); }
/** * Create a new Writer with XML encoding detection rules. * @see XmlStreamWriter */ public static XmlStreamWriter newXmlWriter( OutputStream out ) throws IOException { return new XmlStreamWriter( out ); }
/** * Create a new Writer with XML encoding detection rules. * @see XmlStreamWriter */ public static XmlStreamWriter newXmlWriter( File file ) throws IOException { return new XmlStreamWriter( file ); }