public final class OutputStreamTo extends OutputStream
OutputStream
that encapsulates other destination for the data.
There is no thread-safety guarantee.
Constructor and Description |
---|
OutputStreamTo(File file)
Ctor.
|
OutputStreamTo(Output output)
Ctor.
|
OutputStreamTo(Path path)
Ctor.
|
OutputStreamTo(Writer wtr)
Ctor.
|
OutputStreamTo(Writer wtr,
CharSequence charset)
Ctor.
|
OutputStreamTo(Writer wtr,
CharSequence charset,
int size)
Ctor.
|
OutputStreamTo(Writer wtr,
Charset charset)
Ctor.
|
OutputStreamTo(Writer wtr,
CharsetDecoder ddr,
int size)
Ctor.
|
OutputStreamTo(Writer wtr,
Charset charset,
int size)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
write(byte[] buffer) |
void |
write(byte[] buffer,
int offset,
int length) |
void |
write(int data) |
public OutputStreamTo(Path path)
path
- The pathpublic OutputStreamTo(File file)
file
- The filepublic OutputStreamTo(Writer wtr)
wtr
- The writerpublic OutputStreamTo(Writer wtr, Charset charset)
wtr
- Writercharset
- Charsetpublic OutputStreamTo(Writer wtr, CharSequence charset)
wtr
- Writercharset
- Charsetpublic OutputStreamTo(Writer wtr, Charset charset, int size)
wtr
- Readercharset
- Charsetsize
- Buffer sizepublic OutputStreamTo(Writer wtr, CharSequence charset, int size)
wtr
- Readercharset
- Charsetsize
- Buffer sizepublic OutputStreamTo(Writer wtr, CharsetDecoder ddr, int size)
wtr
- Readerddr
- Charset decodersize
- Buffer sizepublic OutputStreamTo(Output output)
output
- The inputpublic void write(int data) throws IOException
write
in class OutputStream
IOException
public void write(byte[] buffer) throws IOException
write
in class OutputStream
IOException
public void write(byte[] buffer, int offset, int length) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
Copyright © 2017–2019 Cactoos. All rights reserved.