public final class WriterTo extends Writer
Writer
that encapsulates other destination for the data.
There is no thread-safety guarantee.
Constructor and Description |
---|
WriterTo(File file)
Ctor.
|
WriterTo(Output output)
Ctor.
|
WriterTo(Output output,
CharSequence charset)
Ctor.
|
WriterTo(Output output,
Charset charset)
Ctor.
|
WriterTo(Output output,
CharsetEncoder encoder)
Ctor.
|
WriterTo(OutputStream stream)
Ctor.
|
WriterTo(Path path)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
write(char[] cbuf,
int off,
int len) |
public WriterTo(Path path)
path
- The pathpublic WriterTo(File file)
file
- The filepublic WriterTo(OutputStream stream)
stream
- The outpuppublic WriterTo(Output output)
output
- The inputpublic WriterTo(Output output, Charset charset)
output
- The inputcharset
- The charsetpublic WriterTo(Output output, CharSequence charset)
output
- The inputcharset
- The charsetpublic WriterTo(Output output, CharsetEncoder encoder)
output
- The inputencoder
- Charset encoderpublic void write(char[] cbuf, int off, int len) throws IOException
write
in class Writer
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class Writer
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
IOException
Copyright © 2017 Cactoos. All rights reserved.