protected static final class XmlSink.XmlWriter<T> extends FileBasedSink.FileBasedWriter<T>
mimeType| Constructor and Description |
|---|
XmlSink.XmlWriter(XmlSink.XmlWriteOperation<T> writeOperation,
javax.xml.bind.Marshaller marshaller) |
| Modifier and Type | Method and Description |
|---|---|
XmlSink.XmlWriteOperation<T> |
getWriteOperation()
Return the XmlWriteOperation this write belongs to.
|
protected void |
prepareWrite(java.nio.channels.WritableByteChannel channel)
Creates the output stream that elements will be written to.
|
void |
write(T value)
Writes a value to the stream.
|
protected void |
writeFooter()
Writes the root element closing tag.
|
protected void |
writeHeader()
Writes the root element opening tag.
|
close, openpublic XmlSink.XmlWriter(XmlSink.XmlWriteOperation<T> writeOperation, javax.xml.bind.Marshaller marshaller)
protected void prepareWrite(java.nio.channels.WritableByteChannel channel)
throws java.lang.Exception
prepareWrite in class FileBasedSink.FileBasedWriter<T>java.lang.Exceptionprotected void writeHeader()
throws java.lang.Exception
writeHeader in class FileBasedSink.FileBasedWriter<T>java.lang.Exceptionprotected void writeFooter()
throws java.lang.Exception
writeFooter in class FileBasedSink.FileBasedWriter<T>java.lang.Exceptionpublic void write(T value) throws java.lang.Exception
write in class Sink.Writer<T,com.google.cloud.dataflow.sdk.io.FileBasedSink.FileResult>java.lang.Exceptionpublic XmlSink.XmlWriteOperation<T> getWriteOperation()
getWriteOperation in class FileBasedSink.FileBasedWriter<T>