public abstract static class XmlIO.Sink<T> extends java.lang.Object implements FileIO.Sink<T>
XmlIO.sink(java.lang.Class<T>)
.Constructor and Description |
---|
Sink() |
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flushes the buffered state (if any) before the channel is closed.
|
void |
open(java.nio.channels.WritableByteChannel channel)
Initializes writing to the given channel.
|
XmlIO.Sink<T> |
withCharset(java.nio.charset.Charset charset) |
XmlIO.Sink<T> |
withRootElement(java.lang.String rootElement) |
void |
write(T element)
Appends a single element to the file.
|
public XmlIO.Sink<T> withRootElement(java.lang.String rootElement)
public XmlIO.Sink<T> withCharset(java.nio.charset.Charset charset)
public void open(java.nio.channels.WritableByteChannel channel) throws java.io.IOException
FileIO.Sink
FileIO.Sink
instance.open
in interface FileIO.Sink<T>
java.io.IOException
public void write(T element) throws java.io.IOException
FileIO.Sink
write
in interface FileIO.Sink<T>
java.io.IOException
public void flush() throws java.io.IOException
FileIO.Sink
flush
in interface FileIO.Sink<T>
java.io.IOException