Package ubic.basecode.io.reader
Class AbstractMatrixReader<M extends Matrix2D<String,String,V>,V>
- java.lang.Object
-
- ubic.basecode.io.reader.AbstractMatrixReader<M,V>
-
- Direct Known Subclasses:
DoubleMatrixReader
,StringMatrixReader
public abstract class AbstractMatrixReader<M extends Matrix2D<String,String,V>,V> extends Object
Abstract class representing an object that can read in aMatrix2D
from a file.- Author:
- Paul Pavlidis
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description AbstractMatrixReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract M
read(InputStream stream)
abstract M
read(String filename)
abstract M
read(String filename, int maxRows)
protected List<String>
readHeader(BufferedReader dis, int skipColumns)
-
-
-
Method Detail
-
read
public abstract M read(InputStream stream) throws IOException
- Throws:
IOException
-
read
public abstract M read(String filename) throws IOException
- Throws:
IOException
-
read
public abstract M read(String filename, int maxRows) throws IOException
- Throws:
IOException
-
readHeader
protected List<String> readHeader(BufferedReader dis, int skipColumns) throws IOException
- Parameters:
dis
-skipColumns
- how many data columns shoul be ignored- Returns:
- Throws:
IOException
-
-