Class DesignFormatFinderInputStream
- java.lang.Object
-
- java.io.InputStream
-
- fr.ens.biologie.genomique.eoulsan.design.io.DesignFormatFinderInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DesignFormatFinderInputStream extends InputStream implements AutoCloseable
This class allow to automatically detect the format of a design file.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description DesignFormatFinderInputStream(InputStream is)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetDesignFormatVersion()Get the format of the data to read.DesignReadergetDesignReader()Get the DesignReader for the data.intread()-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
DesignFormatFinderInputStream
public DesignFormatFinderInputStream(InputStream is)
Public constructor.- Parameters:
is- InputStream to read
-
-
Method Detail
-
getDesignFormatVersion
public int getDesignFormatVersion() throws IOExceptionGet the format of the data to read.- Returns:
- The format of the data to read
- Throws:
IOException- if an error occurs while reading data
-
getDesignReader
public DesignReader getDesignReader() throws IOException
Get the DesignReader for the data.- Returns:
- the DesignReader for the data
- Throws:
IOException- if an error occurs while reading data
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-