|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
org.apache.commons.io.output.XmlStreamWriter
public class XmlStreamWriter
Character stream that handles all the necessary Voodo to figure out the charset encoding of the XML document written to the stream.
XmlStreamReader| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
XmlStreamWriter(File file)
Construct an new XML stream writer for the specified file with a default encoding of UTF-8. |
|
XmlStreamWriter(File file,
String defaultEncoding)
Construct an new XML stream writer for the specified file with the specified default encoding. |
|
XmlStreamWriter(OutputStream out)
Construct an new XML stream writer for the specified output stream with a default encoding of UTF-8. |
|
XmlStreamWriter(OutputStream out,
String defaultEncoding)
Construct an new XML stream writer for the specified output stream with the specified default encoding. |
|
| Method Summary | |
|---|---|
void |
close()
Close the underlying writer. |
void |
flush()
Flush the underlying writer. |
String |
getDefaultEncoding()
Return the default encoding. |
String |
getEncoding()
Return the detected encoding. |
void |
write(char[] cbuf,
int off,
int len)
Write the characters to the underlying writer, detecing encoding. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlStreamWriter(OutputStream out)
out - The output stream
public XmlStreamWriter(OutputStream out,
String defaultEncoding)
out - The output streamdefaultEncoding - The default encoding if not encoding could be detected
public XmlStreamWriter(File file)
throws FileNotFoundException
file - The file to write to
FileNotFoundException - if there is an error creating or
opening the file
public XmlStreamWriter(File file,
String defaultEncoding)
throws FileNotFoundException
file - The file to write todefaultEncoding - The default encoding if not encoding could be detected
FileNotFoundException - if there is an error creating or
opening the file| Method Detail |
|---|
public String getEncoding()
public String getDefaultEncoding()
public void close()
throws IOException
close in interface Closeableclose in class WriterIOException - if an error occurs closing the underlying writer
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException - if an error occurs flushing the underlying writer
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class Writercbuf - the buffer to write the characters fromoff - The start offsetlen - The number of characters to write
IOException - if an error occurs detecting the encoding
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||