de.java2html.commandline
Class AbstractJava2HtmlConversion
java.lang.Object
de.java2html.commandline.AbstractJava2HtmlConversion
- All Implemented Interfaces:
- IJava2HtmlConversion
- Direct Known Subclasses:
- Java2HtmlDirectoryConversion, Java2HtmlFileConversion
public abstract class AbstractJava2HtmlConversion
- extends java.lang.Object
- implements IJava2HtmlConversion
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractJava2HtmlConversion
public AbstractJava2HtmlConversion(IJavaSourceConverter converter,
JavaSourceConversionOptions options)
getConversionOptions
public final JavaSourceConversionOptions getConversionOptions()
- Specified by:
getConversionOptions
in interface IJava2HtmlConversion
getConverter
public final IJavaSourceConverter getConverter()
- Specified by:
getConverter
in interface IJava2HtmlConversion
readFile
protected byte[] readFile(java.io.File file)
throws java.io.IOException
- Read the contents from the specified file name.
- Parameters:
file
-
- Returns:
- byte[]
- Throws:
java.io.IOException
readAndConvert
protected java.lang.String readAndConvert(java.io.File sourceFile)
throws java.io.IOException
- Invoke the converter on the specified file and return the converted contents.
- Parameters:
sourceFile
- The file to be converted
- Returns:
- a String containing the converted result
- Throws:
java.io.IOException
- when there is an io error reading the file.
convertFile
protected void convertFile(java.io.File sourceFile,
java.io.File targetFile)
- Converts the source file to the targetfile using the specified converter
- Parameters:
sourceFile
- targetFile
- the target file to write the output to or null
if the converter
shall determine an appropriate name for the output file itself.