|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.adatagenerator.util.ResourceUtil
public class ResourceUtil
| Method Summary | |
|---|---|
static void |
closeReader(Reader r)
|
static BufferedReader |
getBufferedReader(ClassLoader cl,
String fqrn)
A general convenience utility that opens a buffered reader to the specified, fully qualified resource name using the specified class loader |
static FrequencyBasedList<String> |
loadFrequencyBasedList(ClassLoader cl,
String fqrn,
String nullValueMarker)
A utility that uses a specified class loader and fully qualified resource name to load a Febrl-style frequency-based list from a resource file. |
static Map<String,List<String>> |
loadMappedLists(ClassLoader cl,
String fqrn)
A utility that uses a specified class loader and fully qualified resource name to load a Febrl-style map of Strings to Lists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static BufferedReader getBufferedReader(ClassLoader cl,
String fqrn)
fqrn - a non-null, non-blank fully qualified resource namecl - a non-null class loader
public static void closeReader(Reader r)
public static FrequencyBasedList<String> loadFrequencyBasedList(ClassLoader cl,
String fqrn,
String nullValueMarker)
throws IOException
cl - a non-null class loaderfqrn - a non-null, non-blank fully qualified resource namenullValueMarker - a String that indicates a value in the frequency-based list is
null; e.g. if the string NULL is specified as the
null value marker, then null would be an element
in the returned list. If null value value itself is null, then
all values in the list are interpreted literally; i.e. the
string NULL would be an element in the returned
list.
IOException
public static Map<String,List<String>> loadMappedLists(ClassLoader cl,
String fqrn)
throws IOException
fqrn - a non-null, non-blank fully qualified resource namecl - a non-null class loader
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||