public abstract static class TextIO.Sink extends java.lang.Object implements FileIO.Sink<java.lang.String>
TextIO.sink()
.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.
|
TextIO.Sink |
withFooter(java.lang.String footer) |
TextIO.Sink |
withHeader(java.lang.String header) |
void |
write(java.lang.String element)
Appends a single element to the file.
|
public TextIO.Sink withHeader(java.lang.String header)
public TextIO.Sink withFooter(java.lang.String footer)
public void open(java.nio.channels.WritableByteChannel channel) throws java.io.IOException
FileIO.Sink
FileIO.Sink
instance.open
in interface FileIO.Sink<java.lang.String>
java.io.IOException
public void write(java.lang.String element) throws java.io.IOException
FileIO.Sink
write
in interface FileIO.Sink<java.lang.String>
java.io.IOException
public void flush() throws java.io.IOException
FileIO.Sink
flush
in interface FileIO.Sink<java.lang.String>
java.io.IOException