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 |
---|---|
private boolean |
isHeader(String line,
char start)
Checks whether the input line is a INI header
|
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.
|
private String |
parseHeader(String line,
char start,
char end)
Parse a header line given input delimiters
|
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
IOException
public IniList parseINI(String path, Class<?> c) throws IOException
IOException
public IniList parseINI(File file) throws IOException
BufferedReader
IOException
public IniList parseINI(BufferedReader in) throws IOException
IOException
public static BufferedReader openTextResource(String path)
public static BufferedReader openTextResource(String path, Class<?> c)
private boolean isHeader(String line, char start)
private String parseHeader(String line, char start, char end)
private int readLine(BufferedReader in, StringBuffer sb) throws IOException
IOException
Copyright © 2016 Open Microscopy Environment