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 void
close()
int
getDesignFormatVersion()
Get the format of the data to read.DesignReader
getDesignReader()
Get the DesignReader for the data.int
read()
-
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 IOException
Get 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:
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
-
-