public interface Output
Here is for example how Output
can be used
together with Input
in order to modify the content
of a text file:
new LengthOfInput( new TeeInput( new TextAsInput(new StringAsText("Hello, world!")), new FileAsOutput(new File("/tmp/names.txt")) ) ).asValue();
Here FileAsOutput
implements Output
and behaves like
one, providing write-only access to the encapsulated
File
. The TeeInput
copies the content of the
input to the output. The LengthOfInput
calculates the size of the copied data.
There is no thread-safety guarantee.
FileAsOutput
,
PathAsOutput
Modifier and Type | Interface and Description |
---|---|
static class |
Output.NoNulls
Output check for no nulls.
|
Modifier and Type | Method and Description |
---|---|
OutputStream |
stream()
Get write access to it.
|
OutputStream stream() throws IOException
IOException
- If something goes wrongCopyright © 2017 Cactoos. All rights reserved.