类 ConverterUtils

java.lang.Object
weka.core.converters.ConverterUtils
所有已实现的接口:
Serializable, RevisionHandler

public class ConverterUtils extends Object implements 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)
另请参阅:
  • 字段详细资料

    • CORE_FILE_LOADERS

      public static final String CORE_FILE_LOADERS
      the core loaders - hardcoded list necessary for RMI/Remote Experiments (comma-separated list).
    • CORE_FILE_SAVERS

      public static final String CORE_FILE_SAVERS
      the core savers - hardcoded list necessary for RMI/Remote Experiments (comma-separated list).
  • 构造器详细资料

    • ConverterUtils

      public ConverterUtils()
  • 方法详细资料

    • getFirstToken

      public static void getFirstToken(StreamTokenizer tokenizer) throws IOException
      Gets token, skipping empty lines.
      参数:
      tokenizer - the stream tokenizer
      抛出:
      IOException - if reading the next token fails
    • getToken

      public static void getToken(StreamTokenizer tokenizer) throws IOException
      Gets token.
      参数:
      tokenizer - the stream tokenizer
      抛出:
      IOException - if reading the next token fails
    • errms

      public static void errms(StreamTokenizer tokenizer, String theMsg) throws IOException
      Throws error message with line number and last token read.
      参数:
      theMsg - the error message to be thrown
      tokenizer - the stream tokenizer
      抛出:
      IOException - containing the error message
    • isCoreFileLoader

      public static boolean isCoreFileLoader(String classname)
      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

      public static Vector<String> getFileLoaders()
      returns a vector with the classnames of all the file loaders.
      返回:
      the classnames of the loaders
    • getLoaderForFile

      public static AbstractFileLoader getLoaderForFile(String filename)
      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

      public static AbstractFileLoader getLoaderForFile(File file)
      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

      public static AbstractFileLoader getLoaderForExtension(String extension)
      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

      public static Vector<String> getURLFileLoaders()
      returns a vector with the classnames of all the URL file loaders.
      返回:
      the classnames of the loaders
    • getURLLoaderForFile

      public 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.
      参数:
      filename - the file to return a URL converter for
      返回:
      the converter if one was found, null otherwise
    • getURLLoaderForFile

      public 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.
      参数:
      file - the file to return a URL converter for
      返回:
      the converter if one was found, null otherwise
    • getURLLoaderForExtension

      public 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.
      参数:
      extension - the file extension to return a URL converter for
      返回:
      the converter if one was found, null otherwise
    • isCoreFileSaver

      public static boolean isCoreFileSaver(String classname)
      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

      public static Vector<String> getFileSavers()
      returns a vector with the classnames of all the file savers.
      返回:
      the classnames of the savers
    • getSaverForFile

      public static AbstractFileSaver getSaverForFile(String filename)
      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

      public static AbstractFileSaver getSaverForFile(File file)
      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

      public static AbstractFileSaver getSaverForExtension(String extension)
      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

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision