Class AbstractConcatInputStream
- java.lang.Object
-
- java.io.InputStream
-
- fr.ens.biologie.genomique.eoulsan.io.AbstractConcatInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
FileConcatInputStream
,PathConcatInputStream
public abstract class AbstractConcatInputStream extends InputStream
This class define an InputStream that concatenate InputStream.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description AbstractConcatInputStream()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
protected abstract boolean
hasNextInputStream()
Test if there is an other InputStream to concatenateboolean
markSupported()
protected abstract InputStream
nextInputStream()
Get the next InputStream to concatenateint
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
-
Methods inherited from class java.io.InputStream
available, mark, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Method Detail
-
hasNextInputStream
protected abstract boolean hasNextInputStream()
Test if there is an other InputStream to concatenate- Returns:
- true if an other InputStream is available
-
nextInputStream
protected abstract InputStream nextInputStream() throws IOException
Get the next InputStream to concatenate- Returns:
- the next InputStream to concatenate
- Throws:
IOException
- if an error occurs while creating InputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classInputStream
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
-