public class XMLWriter
extends java.io.Writer
Constructor and Description |
---|
XMLWriter(java.io.File file,
java.lang.String encoding,
java.lang.String eol)
Creates new XMLWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Flushes the writer (which does the real write-out of data) and closes the
real writer.
|
void |
flush()
Does the real write-out of the data, first adding/replacing encoding
statement.
|
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters.
|
public XMLWriter(java.io.File file, java.lang.String encoding, java.lang.String eol) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
fileName
- file name to write toencoding
- encoding to write a file injava.io.FileNotFoundException
java.io.UnsupportedEncodingException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Writer
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
public void write(char[] cbuf, int off, int len) throws java.io.IOException
write(char[], int, int)
of the internal
StringWriter
.write
in class java.io.Writer
cbuf
- - Array of charactersoff
- - Offset from which to start writing characterslen
- - Number of characters to writejava.io.IOException
- - If an I/O error occurs