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 voidclose()protected abstract booleanhasNextInputStream()Test if there is an other InputStream to concatenatebooleanmarkSupported()protected abstract InputStreamnextInputStream()Get the next InputStream to concatenateintread()intread(byte[] b)intread(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:
markSupportedin classInputStream
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-