Package org.aksw.commons.util
Class MapReader
- java.lang.Object
-
- org.aksw.commons.util.MapReader
-
public class MapReader extends Object
A simple utility class for reading Mapobjects from two column TSV files. Lines whose first non-whitespace character is '#' are treated as comments. - Author:
- Claus Stadler
-
-
Constructor Summary
Constructors Constructor Description MapReader()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static InputStreamgetResourceAsStream(String name)static Map<String,String>read(BufferedReader reader)static Map<String,String>read(File file)static Map<String,String>read(InputStream in)static Map<String,String>read(InputStreamReader reader)static Map<String,String>readFile(File file)Deprecated.static Map<String,String>readFromResource(String name)
-
-
-
Method Detail
-
getResourceAsStream
public static InputStream getResourceAsStream(String name)
-
readFromResource
public static Map<String,String> readFromResource(String name) throws IOException
- Throws:
IOException
-
read
public static Map<String,String> read(File file) throws IOException
- Throws:
IOException
-
read
public static Map<String,String> read(InputStream in) throws IOException
- Throws:
IOException
-
read
public static Map<String,String> read(InputStreamReader reader) throws IOException
- Throws:
IOException
-
read
public static Map<String,String> read(BufferedReader reader) throws IOException
- Throws:
IOException
-
readFile
@Deprecated public static Map<String,String> readFile(File file) throws IOException
Deprecated.- Throws:
IOException
-
-