|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.converters.ConverterUtils
public class ConverterUtils
Utility routines for the converter package.
Serializable,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
ConverterUtils.DataSink
Helper class for saving data to files. |
static class |
ConverterUtils.DataSource
Helper class for loading data from files and URLs. |
| Field Summary | |
|---|---|
static String |
CORE_FILE_LOADERS
the core loaders - hardcoded list necessary for RMI/Remote Experiments (comma-separated list). |
static String |
CORE_FILE_SAVERS
the core savers - hardcoded list necessary for RMI/Remote Experiments (comma-separated list). |
| Constructor Summary | |
|---|---|
ConverterUtils()
|
|
| Method Summary | |
|---|---|
static void |
errms(StreamTokenizer tokenizer,
String theMsg)
Throws error message with line number and last token read. |
static Vector<String> |
getFileLoaders()
returns a vector with the classnames of all the file loaders. |
static Vector<String> |
getFileSavers()
returns a vector with the classnames of all the file savers. |
static void |
getFirstToken(StreamTokenizer tokenizer)
Gets token, skipping empty lines. |
static AbstractFileLoader |
getLoaderForExtension(String extension)
tries to determine the loader to use for this kind of extension, returns null if none can be found. |
static AbstractFileLoader |
getLoaderForFile(File file)
tries to determine the loader to use for this kind of file, returns null if none can be found. |
static AbstractFileLoader |
getLoaderForFile(String filename)
tries to determine the loader to use for this kind of file, returns null if none can be found. |
String |
getRevision()
Returns the revision string. |
static AbstractFileSaver |
getSaverForExtension(String extension)
tries to determine the saver to use for this kind of extension, returns null if none can be found. |
static AbstractFileSaver |
getSaverForFile(File file)
tries to determine the saver to use for this kind of file, returns null if none can be found. |
static AbstractFileSaver |
getSaverForFile(String filename)
tries to determine the saver to use for this kind of file, returns null if none can be found. |
static void |
getToken(StreamTokenizer tokenizer)
Gets token. |
static Vector<String> |
getURLFileLoaders()
returns a vector with the classnames of all the URL file loaders. |
static AbstractFileLoader |
getURLLoaderForExtension(String extension)
tries to determine the URL loader to use for this kind of extension, returns null if none can be found. |
static AbstractFileLoader |
getURLLoaderForFile(File file)
tries to determine the URL loader to use for this kind of file, returns null if none can be found. |
static AbstractFileLoader |
getURLLoaderForFile(String filename)
tries to determine the URL loader to use for this kind of file, returns null if none can be found. |
static void |
initialize()
|
static boolean |
isCoreFileLoader(String classname)
checks whether the given class is one of the hardcoded core file loaders. |
static boolean |
isCoreFileSaver(String classname)
checks whether the given class is one of the hardcoded core file savers. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CORE_FILE_LOADERS
public static final String CORE_FILE_SAVERS
| Constructor Detail |
|---|
public ConverterUtils()
| Method Detail |
|---|
public static void initialize()
public static void getFirstToken(StreamTokenizer tokenizer)
throws IOException
tokenizer - the stream tokenizer
IOException - if reading the next token fails
public static void getToken(StreamTokenizer tokenizer)
throws IOException
tokenizer - the stream tokenizer
IOException - if reading the next token fails
public static void errms(StreamTokenizer tokenizer,
String theMsg)
throws IOException
theMsg - the error message to be throwntokenizer - the stream tokenizer
IOException - containing the error messagepublic static boolean isCoreFileLoader(String classname)
classname - the class to check
CORE_FILE_LOADERSpublic static Vector<String> getFileLoaders()
public static AbstractFileLoader getLoaderForFile(String filename)
filename - the file to return a converter for
public static AbstractFileLoader getLoaderForFile(File file)
file - the file to return a converter for
public static AbstractFileLoader getLoaderForExtension(String extension)
extension - the file extension to return a converter for
public static Vector<String> getURLFileLoaders()
public static AbstractFileLoader getURLLoaderForFile(String filename)
filename - the file to return a URL converter for
public static AbstractFileLoader getURLLoaderForFile(File file)
file - the file to return a URL converter for
public static AbstractFileLoader getURLLoaderForExtension(String extension)
extension - the file extension to return a URL converter for
public static boolean isCoreFileSaver(String classname)
classname - the class to check
CORE_FILE_SAVERSpublic static Vector<String> getFileSavers()
public static AbstractFileSaver getSaverForFile(String filename)
filename - the file to return a converter for
public static AbstractFileSaver getSaverForFile(File file)
file - the file to return a converter for
public static AbstractFileSaver getSaverForExtension(String extension)
extension - the file extension to return a converter for
public String getRevision()
getRevision in interface RevisionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||