Class MultiReader

    • Constructor Detail

      • MultiReader

        public MultiReader​(Reader[] readers)
        Construct a new Reader combining a list of Readers.
        Parameters:
        readers - The readers that should be combined.
    • Method Detail

      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws IOException
        Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
        Specified by:
        read in class Reader
        Parameters:
        cbuf - Destination buffer
        off - Offset at which to start storing characters
        len - Maximum number of characters to read
        Returns:
        The number of characters read, or -1 if the end of the stream of all combined readers have been reached.
        Throws:
        IOException - If an I/O error occurs