public class XmlStreamWriter extends Writer
To build an instance, use XmlStreamWriter.Builder.
XmlStreamWriter.Builder,
XmlStreamReader| Modifier and Type | Class and Description |
|---|---|
static class |
XmlStreamWriter.Builder
Builds a new
XmlStreamWriter. |
| Modifier and Type | Method and Description |
|---|---|
static XmlStreamWriter.Builder |
builder()
Constructs a new
XmlStreamWriter.Builder. |
void |
close()
Closes the underlying writer.
|
void |
flush()
Flushes the underlying writer.
|
String |
getDefaultEncoding()
Returns the default encoding.
|
String |
getEncoding()
Returns the detected encoding.
|
void |
write(char[] cbuf,
int off,
int len)
Writes the characters to the underlying writer, detecting encoding.
|
public static XmlStreamWriter.Builder builder()
XmlStreamWriter.Builder.XmlStreamWriter.Builder.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOException - if an error occurs closing the underlying writerpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException - if an error occurs flushing the underlying writerpublic String getDefaultEncoding()
public String getEncoding()
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 writeIOException - if an error occurs detecting the encoding