Package org.codehaus.plexus.util.xml
Class XmlStreamWriter
java.lang.Object
java.io.Writer
org.codehaus.plexus.util.xml.XmlStreamWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Character stream that handles (or at least attempts to) all the necessary Voodo to figure out the charset encoding of
the XML document written to the stream.
- Since:
- 1.4.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private String
(package private) static final Pattern
private OutputStream
private Writer
private StringWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
detectEncoding
(char[] cbuf, int off, int len) void
flush()
void
write
(char[] cbuf, int off, int len)
-
Field Details
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
xmlPrologWriter
-
out
-
writer
-
encoding
-
ENCODING_PATTERN
-
-
Constructor Details
-
XmlStreamWriter
-
XmlStreamWriter
- Throws:
IOException
-
-
Method Details
-
getEncoding
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
detectEncoding
- Throws:
IOException
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-