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 Readers in sequence.- Since:
- 2.7
-
Constructor Summary
Constructors Constructor and Description SequenceReader(Iterable<? extends Reader> readers)
Construct a new instance with readersSequenceReader(Reader... readers)
Construct 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)
-
Constructor Detail
SequenceReader
public SequenceReader(Iterable<? extends Reader> readers)
Construct a new instance with readers- Parameters:
-
readers
- the readers to read
SequenceReader
public SequenceReader(Reader... readers)
Construct a new instance with readers- Parameters:
-
readers
- the readers to read
Method Detail
close
public void close() throws IOException
- Specified by:
-
close
in interfaceCloseable
- Specified by:
-
close
in interfaceAutoCloseable
- Specified by:
-
close
in classReader
- Throws:
-
IOException
read
public int read() throws IOException
- Overrides:
-
read
in classReader
- Throws:
-
IOException
read
public int read(char[] cbuf, int off, int len) throws IOException
- Specified by:
-
read
in classReader
- Throws:
-
IOException
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.