T
- the type of the outputpublic class InputStreamTranslatorFactory<T> extends java.lang.Object implements TranslatorFactory<java.io.InputStream,T>
Translator
that can process image from an InputStream
.Constructor and Description |
---|
InputStreamTranslatorFactory(TranslatorFactory<Image,T> factory)
Creates a
FileTranslatorFactory instance. |
Modifier and Type | Method and Description |
---|---|
Translator<java.io.InputStream,T> |
newInstance(Model model,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Returns a new instance of the
Translator class. |
public InputStreamTranslatorFactory(TranslatorFactory<Image,T> factory)
FileTranslatorFactory
instance.factory
- a factory that can process imagepublic Translator<java.io.InputStream,T> newInstance(Model model, java.util.Map<java.lang.String,java.lang.Object> arguments) throws TranslateException
Translator
class.newInstance
in interface TranslatorFactory<java.io.InputStream,T>
model
- the Model
that uses the Translator
arguments
- the configurations for a new Translator
instanceTranslator
classTranslateException
- if failed to create Translator instance