org.apache.commons.io.input

## Class SequenceReader

- java.lang.Object
- - java.io.Reader
  - - org.apache.commons.io.input.SequenceReader

- All Implemented Interfaces:
    Closeable, AutoCloseable, Readable

      public class SequenceReader
      extends Reader

  Provides the contents of multiple `Reader`s in sequence.

  Like `SequenceInputStream` but for `Reader` arguments.

  Since:
    2.7

- - ### Field Summary

    - ### Fields inherited from class java.io.Reader

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SequenceReader(Iterable<? extends Reader> readers)` Constructs a new instance with readers
    `SequenceReader(Reader... readers)` Constructs a new instance with readers

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `int` | `read()`
    `int` | `read(char[] cbuf, int off, int len)`

    - ### Methods inherited from class java.io.Reader

      `mark, markSupported, read, read, ready, reset, skip`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SequenceReader

          public SequenceReader(Iterable<? extends Reader> readers)

      Constructs a new instance with readers
      Parameters:
        `readers` - the readers to read

    - #### SequenceReader

          public SequenceReader(Reader... readers)

      Constructs a new instance with readers
      Parameters:
        `readers` - the readers to read

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in class `Reader`
      Throws:
        `IOException`

    - #### read

          public int read()
                   throws IOException

      Overrides:
        `read` in class `Reader`
      Throws:
        `IOException`

    - #### read

          public int read(char[] cbuf,
                          int off,
                          int len)
                   throws IOException

      Specified by:
        `read` in class `Reader`
      Throws:
        `IOException`

Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.