public class IniParser extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
commentDelimiter |
private static org.slf4j.Logger |
LOGGER
Logger for this class.
|
private boolean |
slashContinues |
| Constructor and Description |
|---|
IniParser() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedReader |
openTextResource(String path)
Opens a buffered reader for the given resource.
|
static BufferedReader |
openTextResource(String path,
Class<?> c)
Opens a buffered reader for the given resource.
|
IniList |
parseINI(BufferedReader in)
Parses the INI-style configuration data from the given input stream.
|
IniList |
parseINI(File file)
Parses the INI-style wrapping the given file in a
BufferedReader |
IniList |
parseINI(String path)
Parses the INI-style configuration data from the given resource.
|
IniList |
parseINI(String path,
Class<?> c)
Parses the INI-style configuration data from the given resource,
using the given class to find the resource.
|
private int |
readLine(BufferedReader in,
StringBuffer sb)
Reads (at least) one line from the given input stream
into the specified string buffer.
|
void |
setBackslashContinuesLine(boolean slashContinues)
Set whether or not a '\' at the end of a line signifies that the
line continues on the following line.
|
void |
setCommentDelimiter(String delimiter)
Set the String that identifies a comment.
|
private static final org.slf4j.Logger LOGGER
private String commentDelimiter
private boolean slashContinues
public void setCommentDelimiter(String delimiter)
public void setBackslashContinuesLine(boolean slashContinues)
public IniList parseINI(String path) throws IOException
IOExceptionpublic IniList parseINI(String path, Class<?> c) throws IOException
IOExceptionpublic IniList parseINI(File file) throws IOException
BufferedReaderIOExceptionpublic IniList parseINI(BufferedReader in) throws IOException
IOExceptionpublic static BufferedReader openTextResource(String path)
public static BufferedReader openTextResource(String path, Class<?> c)
private int readLine(BufferedReader in, StringBuffer sb) throws IOException
IOExceptionCopyright © 2016 Open Microscopy Environment