|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object file2xliff4j.ConverterFactory
public class ConverterFactory
Field Summary | |
---|---|
static int |
SIG_LENGTH
A default number of bytes to attempt to read |
Constructor Summary | |
---|---|
ConverterFactory()
|
Method Summary | |
---|---|
static Converter |
createConverter(FileType fromType,
FileType toType)
Passed the "from" and "to" types of a conversion request, return an appropriate converter that knows how to perform the conversion. |
static Converter |
createConverter(FileType fromType,
FileType toType,
FileType originalType)
Passed the "from" and "to" types of a conversion request, return an appropriate converter that knows how to perform the conversion. |
static Converter |
createConverter(FileType fromType,
FileType toType,
java.lang.String fromFileName)
Passed the "from" and "to" types of a conversion request, as well as the file name of the "from" file (with the full path specified) return an appropriate converter that knows how to perform the conversion. |
static FileType |
identifyFormat(java.lang.String fileName)
Passed the name of a file, read its initial bytes and identify its format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SIG_LENGTH
Constructor Detail |
---|
public ConverterFactory()
Method Detail |
---|
public static Converter createConverter(FileType fromType, FileType toType) throws ConversionException
fromType
- The type that will be converted fromtoType
- Type of file that will be converted to
ConversionException
- if unable to create the requested Converterpublic static Converter createConverter(FileType fromType, FileType toType, FileType originalType) throws ConversionException
New functionality: A new third parameter--originalType--is now used for converters that convert from XLIFF to a format that is different from the original format. This occurs, for example, with PDF, where the export of target documents is currently to Word, ODT or plaintext. (Some future release of the PDF Exporters might actually be smart enough to export back to PDF format and have it look reasonable [sigh].)
fromType
- The type that will be converted fromtoType
- Type of file that will be converted to
ConversionException
- if unable to create the requested Converterpublic static Converter createConverter(FileType fromType, FileType toType, java.lang.String fromFileName) throws ConversionException
fromType
- The type that will be converted fromtoType
- Type of file that will be converted tofromFileName
- The full path/file name of the file converting from
ConversionException
- if unable to create the requested Converterpublic static FileType identifyFormat(java.lang.String fileName)
fileName
- The name of the file (including full path name)
whose format will be confirmed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |