类 ConverterUtils
java.lang.Object
weka.core.converters.ConverterUtils
- 所有已实现的接口:
Serializable
,RevisionHandler
Utility routines for the converter package.
- 版本:
- $Revision: 6416 $
- 作者:
- Mark Hall (mhall@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static class
Helper class for saving data to files.static class
Helper class for loading data from files and URLs. -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static void
errms
(StreamTokenizer tokenizer, String theMsg) Throws error message with line number and last token read.returns a vector with the classnames of all the file loaders.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.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.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 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.
-
字段详细资料
-
CORE_FILE_LOADERS
the core loaders - hardcoded list necessary for RMI/Remote Experiments (comma-separated list). -
CORE_FILE_SAVERS
the core savers - hardcoded list necessary for RMI/Remote Experiments (comma-separated list).
-
-
构造器详细资料
-
ConverterUtils
public ConverterUtils()
-
-
方法详细资料
-
getFirstToken
Gets token, skipping empty lines.- 参数:
tokenizer
- the stream tokenizer- 抛出:
IOException
- if reading the next token fails
-
getToken
Gets token.- 参数:
tokenizer
- the stream tokenizer- 抛出:
IOException
- if reading the next token fails
-
errms
Throws error message with line number and last token read.- 参数:
theMsg
- the error message to be throwntokenizer
- the stream tokenizer- 抛出:
IOException
- containing the error message
-
isCoreFileLoader
checks whether the given class is one of the hardcoded core file loaders.- 参数:
classname
- the class to check- 返回:
- true if the class is one of the core loaders
- 另请参阅:
-
getFileLoaders
returns a vector with the classnames of all the file loaders.- 返回:
- the classnames of the loaders
-
getLoaderForFile
tries to determine the loader to use for this kind of file, returns null if none can be found.- 参数:
filename
- the file to return a converter for- 返回:
- the converter if one was found, null otherwise
-
getLoaderForFile
tries to determine the loader to use for this kind of file, returns null if none can be found.- 参数:
file
- the file to return a converter for- 返回:
- the converter if one was found, null otherwise
-
getLoaderForExtension
tries to determine the loader to use for this kind of extension, returns null if none can be found.- 参数:
extension
- the file extension to return a converter for- 返回:
- the converter if one was found, null otherwise
-
getURLFileLoaders
returns a vector with the classnames of all the URL file loaders.- 返回:
- the classnames of the loaders
-
getURLLoaderForFile
tries to determine the URL loader to use for this kind of file, returns null if none can be found.- 参数:
filename
- the file to return a URL converter for- 返回:
- the converter if one was found, null otherwise
-
getURLLoaderForFile
tries to determine the URL loader to use for this kind of file, returns null if none can be found.- 参数:
file
- the file to return a URL converter for- 返回:
- the converter if one was found, null otherwise
-
getURLLoaderForExtension
tries to determine the URL loader to use for this kind of extension, returns null if none can be found.- 参数:
extension
- the file extension to return a URL converter for- 返回:
- the converter if one was found, null otherwise
-
isCoreFileSaver
checks whether the given class is one of the hardcoded core file savers.- 参数:
classname
- the class to check- 返回:
- true if the class is one of the core savers
- 另请参阅:
-
getFileSavers
returns a vector with the classnames of all the file savers.- 返回:
- the classnames of the savers
-
getSaverForFile
tries to determine the saver to use for this kind of file, returns null if none can be found.- 参数:
filename
- the file to return a converter for- 返回:
- the converter if one was found, null otherwise
-
getSaverForFile
tries to determine the saver to use for this kind of file, returns null if none can be found.- 参数:
file
- the file to return a converter for- 返回:
- the converter if one was found, null otherwise
-
getSaverForExtension
tries to determine the saver to use for this kind of extension, returns null if none can be found.- 参数:
extension
- the file extension to return a converter for- 返回:
- the converter if one was found, null otherwise
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-