public class Engine extends java.lang.Object implements IAutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Deletes native counterpart of this auto closable object
|
static Engine |
create(byte[] certificate)
Creates a new engine.
|
Editor |
createEditor(Renderer renderer)
Creates a new editor.
|
ContentPackage |
createPackage(java.io.File file)
Creates a new package.
|
ContentPackage |
createPackage(java.lang.String path)
Creates a new package.
|
Renderer |
createRenderer(float dpiX,
float dpiY,
IRenderTarget renderTarget)
Creates a new renderer.
|
Configuration |
getConfiguration()
Returns the configuration associated with this engine.
|
java.lang.String[] |
getSupportedPartTypes()
Returns the set of content part types that this engine can handle.
|
boolean |
isClosed()
Tells whether the
close() method has been called. |
ContentPackage |
openPackage(java.io.File file)
Opens the specified package.
|
ContentPackage |
openPackage(java.lang.String path)
Opens the specified package.
|
public static final Engine create(byte[] certificate) throws java.lang.IllegalArgumentException
Note: make sure to close the returned object.
certificate
- the certificate that identifies you as a valid MyScript
technology integrator.java.lang.IllegalArgumentException
- when the certificate is invalid.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.public final Configuration getConfiguration()
Note: don't close the returned object as it is owned by the engine.
public final ContentPackage createPackage(java.io.File file) throws java.io.IOException
Note: make sure to close the returned object.
file
- the package file.java.io.IOException
- if a package with associated filename already exists.java.io.IOException
- if an I/O operation fails.java.lang.IllegalArgumentException
- if a package associated with the same filename
is already opened, it can be accessed via a call to openPackage().public final ContentPackage createPackage(java.lang.String path) throws java.io.IOException
Note: make sure to close the returned object.
path
- the package file path.java.io.IOException
- if a package with associated filename already exists.java.io.IOException
- if an I/O operation fails.java.lang.IllegalArgumentException
- if a package associated with the same filename
is already opened, it can be accessed via a call to openPackage().public final ContentPackage openPackage(java.io.File file) throws java.io.IOException
Note: make sure to close the returned object.
file
- the package file.java.io.IOException
- if a package with associated filename does not exist.java.io.IOException
- if an I/O operation fails.public final ContentPackage openPackage(java.lang.String path) throws java.io.IOException
Note: make sure to close the returned object.
path
- the package file path.java.io.IOException
- if a package with associated filename does not exist.java.io.IOException
- if an I/O operation fails.public final Renderer createRenderer(float dpiX, float dpiY, IRenderTarget renderTarget)
Note: make sure to close the returned object.
dpiX
- the physical horizontal resolution of the display in dots per
inch.dpiY
- the physical vertical resolution of the display in dots per
inch.renderTarget
- the render target.public final Editor createEditor(Renderer renderer)
renderer
- the renderer to be used to display editor's content.public final java.lang.String[] getSupportedPartTypes()