public class ConverterUtils extends java.lang.Object implements java.io.Serializable, RevisionHandler
Serializable
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ConverterUtils.DataSink
Helper class for saving data to files.
|
static class |
ConverterUtils.DataSource
Helper class for loading data from files and URLs.
|
Constructor and Description |
---|
ConverterUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
errms(java.io.StreamTokenizer tokenizer,
java.lang.String theMsg)
Throws error message with line number and last token read.
|
static java.util.Vector<java.lang.String> |
getFileLoaders()
returns a vector with the classnames of all the file loaders.
|
static java.util.Vector<java.lang.String> |
getFileSavers()
returns a vector with the classnames of all the file savers.
|
static void |
getFirstToken(java.io.StreamTokenizer tokenizer)
Gets token, skipping empty lines.
|
static AbstractFileLoader |
getLoaderForExtension(java.lang.String extension)
tries to determine the loader to use for this kind of extension, returns
null if none can be found.
|
static AbstractFileLoader |
getLoaderForFile(java.io.File file)
tries to determine the loader to use for this kind of file, returns null if
none can be found.
|
static AbstractFileLoader |
getLoaderForFile(java.lang.String filename)
tries to determine the loader to use for this kind of file, returns null if
none can be found.
|
static java.util.List<AbstractFileLoader> |
getLoadersForExtension(java.lang.String extension)
tries to determine the loader to use for this kind of extension, returns
null if none can be found.
|
static java.util.List<AbstractFileLoader> |
getLoadersForFile(java.io.File file)
tries to determine the loaders to use for this kind of file.
|
static java.util.List<AbstractFileLoader> |
getLoadersForFile(java.lang.String filename)
tries to determine the loaders to use for this kind of file.
|
java.lang.String |
getRevision()
Returns the revision string.
|
static AbstractFileSaver |
getSaverForExtension(java.lang.String extension)
tries to determine the saver to use for this kind of extension, returns
null if none can be found.
|
static AbstractFileSaver |
getSaverForFile(java.io.File file)
tries to determine the saver to use for this kind of file, returns null if
none can be found.
|
static AbstractFileSaver |
getSaverForFile(java.lang.String filename)
tries to determine the saver to use for this kind of file, returns null if
none can be found.
|
static java.util.List<AbstractFileSaver> |
getSaversForExtension(java.lang.String extension)
tries to determine the savers to use for this kind of extension.
|
static java.util.List<AbstractFileSaver> |
getSaversForFile(java.io.File file)
tries to determine the savers to use for this kind of file.
|
static java.util.List<AbstractFileSaver> |
getSaversForFile(java.lang.String filename)
tries to determine the savers to use for this kind of file.
|
static void |
getToken(java.io.StreamTokenizer tokenizer)
Gets token.
|
static java.util.Vector<java.lang.String> |
getURLFileLoaders()
returns a vector with the classnames of all the URL file loaders.
|
static AbstractFileLoader |
getURLLoaderForExtension(java.lang.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(java.io.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(java.lang.String filename)
tries to determine the URL loader to use for this kind of file, returns
null if none can be found.
|
static java.util.List<AbstractFileLoader> |
getURLLoadersForExtension(java.lang.String extension)
tries to determine the URL loaders to use for this kind of extension.
|
static java.util.List<AbstractFileLoader> |
getURLLoadersForFile(java.io.File file)
tries to determine the URL loaders to use for this kind of file.
|
static java.util.List<AbstractFileLoader> |
getURLLoadersForFile(java.lang.String filename)
tries to determine the URL loader to use for this kind of file.
|
static void |
initialize() |
public static void initialize()
public static void getFirstToken(java.io.StreamTokenizer tokenizer) throws java.io.IOException
tokenizer
- the stream tokenizerjava.io.IOException
- if reading the next token failspublic static void getToken(java.io.StreamTokenizer tokenizer) throws java.io.IOException
tokenizer
- the stream tokenizerjava.io.IOException
- if reading the next token failspublic static void errms(java.io.StreamTokenizer tokenizer, java.lang.String theMsg) throws java.io.IOException
theMsg
- the error message to be throwntokenizer
- the stream tokenizerjava.io.IOException
- containing the error messagepublic static java.util.Vector<java.lang.String> getFileLoaders()
public static AbstractFileLoader getLoaderForFile(java.lang.String filename)
filename
- the file to return a converter forpublic static java.util.List<AbstractFileLoader> getLoadersForFile(java.lang.String filename)
filename
- the file to return converters forpublic static AbstractFileLoader getLoaderForFile(java.io.File file)
file
- the file to return a converter forpublic static java.util.List<AbstractFileLoader> getLoadersForFile(java.io.File file)
file
- the file to return converters forpublic static AbstractFileLoader getLoaderForExtension(java.lang.String extension)
extension
- the file extension to return a converter forpublic static java.util.List<AbstractFileLoader> getLoadersForExtension(java.lang.String extension)
extension
- the file extension to return a converter forpublic static java.util.Vector<java.lang.String> getURLFileLoaders()
public static AbstractFileLoader getURLLoaderForFile(java.lang.String filename)
filename
- the file to return a URL converter forpublic static java.util.List<AbstractFileLoader> getURLLoadersForFile(java.lang.String filename)
filename
- the file to return URL converters forpublic static AbstractFileLoader getURLLoaderForFile(java.io.File file)
file
- the file to return a URL converter forpublic static java.util.List<AbstractFileLoader> getURLLoadersForFile(java.io.File file)
file
- the file to return URL converters forpublic static AbstractFileLoader getURLLoaderForExtension(java.lang.String extension)
extension
- the file extension to return a URL converter forpublic static java.util.List<AbstractFileLoader> getURLLoadersForExtension(java.lang.String extension)
extension
- the file extension to return URL converters forpublic static java.util.Vector<java.lang.String> getFileSavers()
public static AbstractFileSaver getSaverForFile(java.lang.String filename)
filename
- the file to return a converter forpublic static java.util.List<AbstractFileSaver> getSaversForFile(java.lang.String filename)
filename
- the file to return converters forpublic static AbstractFileSaver getSaverForFile(java.io.File file)
file
- the file to return a converter forpublic static java.util.List<AbstractFileSaver> getSaversForFile(java.io.File file)
file
- the file to return converters forpublic static AbstractFileSaver getSaverForExtension(java.lang.String extension)
extension
- the file extension to return a converter forpublic static java.util.List<AbstractFileSaver> getSaversForExtension(java.lang.String extension)
extension
- the file extension to return converters forpublic java.lang.String getRevision()
getRevision
in interface RevisionHandler