Package ubic.basecode.io.reader
Class MapReader
- java.lang.Object
-
- ubic.basecode.io.reader.MapReader
-
public class MapReader extends Object
Reads a tab-delimited file with keys in first column, values in second.- Author:
- Paul Pavlidis
-
-
Constructor Summary
Constructors Constructor Description MapReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
read(InputStream stream)
Map<String,String>
read(InputStream stream, boolean hasHeader)
Map<String,String>
read(String filename)
Map<String,String>
read(String filename, boolean hasHeader)
-
-
-
Method Detail
-
read
public Map<String,String> read(InputStream stream) throws IOException
- Parameters:
stream
- InputStream- Returns:
- Throws:
IOException
-
read
public Map<String,String> read(InputStream stream, boolean hasHeader) throws IOException
- Parameters:
stream
- InputStreamhasHeader
- boolean if a one-line header is present.- Returns:
- Throws:
IOException
-
read
public Map<String,String> read(String filename) throws IOException
- Parameters:
filename
- String- Returns:
- Map
- Throws:
IOException
-
read
public Map<String,String> read(String filename, boolean hasHeader) throws IOException
- Parameters:
filename
- name of the tab-delimited filehasHeader
- boolean if a one-line header is present.- Returns:
- Map from the file.
- Throws:
IOException
-
-