public class RecognitionAssetsBuilder extends java.lang.Object implements IAutoCloseable
Modifier and Type | Method and Description |
---|---|
protected void |
checkNotClosed() |
void |
close()
Deletes native counterpart of this auto closable object
|
void |
compile(java.lang.String type,
java.lang.String data)
Compile data into a recognition asset.
|
java.lang.String |
getCompilationErrors()
Get the last compilation errors.
|
java.lang.String[] |
getSupportedRecognitionAssetsTypes()
Returns the set of recognition assets types that this recognition assets builder can handle.
|
boolean |
isClosed()
Tells whether the
close() method has been called. |
void |
store(java.lang.String path)
Save the previously compiled recognition asset.
|
public final void close()
IAutoCloseable
close
in interface IAutoCloseable
public final boolean isClosed()
close()
method has been called. Once an object
is closed any method will throw IllegalStateException
.true
if this object is closed.protected final void checkNotClosed()
public final java.lang.String[] getSupportedRecognitionAssetsTypes()
public void compile(java.lang.String type, java.lang.String data) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
type
- the type of asset that will be generated.data
- the data to compile.java.lang.IllegalArgumentException
- when type
is not supported.java.lang.RuntimeException
- when the content of data could not be compiled into a recognition asset.public final java.lang.String getCompilationErrors()
public void store(java.lang.String path) throws java.io.IOException
path
- the path to destination file.java.io.IOException
- when there is no valid recognition asset to store.java.io.IOException
- if an I/O operation fails.