Class InputOf

  • All Implemented Interfaces:
    Input

    public final class InputOf
    extends Object
    implements Input
    An Input that encapsulates other sources of data.

    There is no thread-safety guarantee.

    Since:
    0.11.8
    • Constructor Detail

      • InputOf

        public InputOf​(File file)
        Ctor.
        Parameters:
        file - The file
      • InputOf

        public InputOf​(Path path)
        Ctor.
        Parameters:
        path - The path
      • InputOf

        public InputOf​(URI uri)
        Ctor.
        Parameters:
        uri - The URI
      • InputOf

        public InputOf​(URL url)
        Ctor.
        Parameters:
        url - The URL
      • InputOf

        public InputOf​(Scalar<URL> scalar)
        Ctor.
        Parameters:
        scalar - The url
      • InputOf

        public InputOf​(Reader rdr)
        Ctor.
        Parameters:
        rdr - Reader
      • InputOf

        public InputOf​(Reader rdr,
                       Charset charset)
        Ctor.
        Parameters:
        rdr - Reader
        charset - Charset
      • InputOf

        public InputOf​(Reader rdr,
                       CharSequence charset)
        Ctor.
        Parameters:
        rdr - Reader
        charset - Charset
      • InputOf

        public InputOf​(Reader rdr,
                       int max)
        Ctor.
        Parameters:
        rdr - Reader
        max - Buffer size
        Since:
        0.13.3
      • InputOf

        public InputOf​(Reader rdr,
                       Charset charset,
                       int max)
        Ctor.
        Parameters:
        rdr - Reader
        charset - Charset
        max - Buffer size
      • InputOf

        public InputOf​(Reader rdr,
                       CharSequence charset,
                       int max)
        Ctor.
        Parameters:
        rdr - Reader
        charset - Charset
        max - Buffer size
      • InputOf

        public InputOf​(char... chars)
        Ctor.
        Parameters:
        chars - The chars
      • InputOf

        public InputOf​(char[] chars,
                       Charset charset)
        Ctor.
        Parameters:
        chars - The chars
        charset - The charset
      • InputOf

        public InputOf​(char[] chars,
                       CharSequence charset)
        Ctor.
        Parameters:
        chars - The chars
        charset - The charset
      • InputOf

        public InputOf​(CharSequence source)
        Ctor.
        Parameters:
        source - The string
      • InputOf

        public InputOf​(CharSequence source,
                       Charset charset)
        Ctor.
        Parameters:
        source - The string
        charset - The charset
      • InputOf

        public InputOf​(CharSequence source,
                       CharSequence charset)
        Ctor.
        Parameters:
        source - The string
        charset - The charset
      • InputOf

        public InputOf​(Text text)
        Ctor.
        Parameters:
        text - The text
      • InputOf

        public InputOf​(Text text,
                       Charset charset)
        Ctor.
        Parameters:
        text - The text
        charset - The charset
      • InputOf

        public InputOf​(Text text,
                       CharSequence charset)
        Ctor.
        Parameters:
        text - The text
        charset - The charset
      • InputOf

        public InputOf​(Throwable error)
        Ctor.
        Parameters:
        error - The exception to serialize
      • InputOf

        public InputOf​(Throwable error,
                       Charset charset)
        Ctor.
        Parameters:
        error - The exception to serialize
        charset - Charset
      • InputOf

        public InputOf​(Throwable error,
                       CharSequence charset)
        Ctor.
        Parameters:
        error - The exception to serialize
        charset - Charset
      • InputOf

        public InputOf​(byte[] bytes)
        Ctor.
        Parameters:
        bytes - The bytes
      • InputOf

        public InputOf​(Bytes src)
        Ctor.
        Parameters:
        src - The bytes
      • InputOf

        public InputOf​(InputStream stream)
        Ctor.
        Parameters:
        stream - The stream
    • Method Detail

      • stream

        public InputStream stream()
                           throws Exception
        Description copied from interface: Input
        Get read access to it.
        Specified by:
        stream in interface Input
        Returns:
        InputStream to read from
        Throws:
        Exception - If something goes wrong