kactoos-jvm / nnl.rocks.kactoos / Input
@FunctionalInterface interface Input
Input.
Here is for example how Input can be used in order to read the content of a text file:
String content = new TextOf(
new InputOf(new File("/tmp/names.txt"))
).asString();
Here nnl.rocks.kactoos.io.InputOf implements Input and behaves like one, providing read-only access to the encapsulated java.io.File.
There is no thread-safety guarantee.
See Also
Since 0.1
Name | Summary |
---|---|
stream | abstract fun stream(): InputStream Get read access to it. |
Name | Summary |
---|---|
CheckedInput | class CheckedInput<E> : Input Input that throws exception of specified type. |
DeadInput | class DeadInput : Input Input with no data. |
GzipInput | class GzipInput : Input Input that reads compressed data from the GZIP file format. |
HeadInput | class HeadInput : Input Input that only shows the first N bytes of the original input. |
InputOf | class InputOf : Input An Input that encapsulates other sources of data. |
InputWithFallback | class InputWithFallback : Input Input that returns an alternative input if the main one throws IOException. |
Joined | class Joined : Input Concatenation of several inputs. |
LoggingInput | class LoggingInput : Input Logged input. |
ResourceOf | class ResourceOf : Input Classpath resource. |
StdinInput | class StdinInput : Input Input that reads from stdin . |
StickyInput | class StickyInput : Input Input that reads only once. |
SyncInput | class SyncInput : Input Thread-safe Input. |
TailInput | class TailInput : Input Input showing only last N bytes of the stream. |
TeeInput | class TeeInput : Input Input to Output copying pipe. |
UncheckedInput | class UncheckedInput : Input Input that doesn’t throw checked Exception. |
Zip | class Zip : Input Zip files and directory. |