Page Summary
-
The Model class provides information about a model.
-
It includes nested classes
Model.Builderfor building Model objects andModel.ModelLocationfor specifying where to load the model from. -
The class provides methods to retrieve model information based on its location, such as file descriptor, offset, path, or ByteBuffer.
-
Unique identifiers for the model, including
modelIdandmodelNamespace, can also be retrieved. -
Several standard methods are inherited from the
java.lang.Objectclass.
Model information.
Nested Class Summary
Public Method Summary
| long | fileDescriptor
()
Returns the model file descriptor if
Model.ModelLocation
was created with Model.ModelLocation.fromFileDescriptor(long, long, long)
. |
| long | fileOffset
()
Returns the model file offset if
Model.ModelLocation
was created with Model.ModelLocation.fromFileDescriptor(long, long, long)
. |
| String | filePath
()
Returns the model file path if
Model.ModelLocation
was created with Model.ModelLocation.fromFilePath(String)
or Model.ModelLocation.fromFile(File)
. |
| ByteBuffer | modelBuffer
()
Returns the model data if
Model.ModelLocation
was created with Model.ModelLocation.fromByteBuffer(ByteBuffer)
. |
| String | |
| long | modelLength
()
Returns the model file length if
Model.ModelLocation
was created with Model.ModelLocation.fromFileDescriptor(long, long, long)
. |
| String |
Inherited Method Summary
Public Methods
public long fileDescriptor ()
Returns the model file descriptor if Model.ModelLocation
was created with Model.ModelLocation.fromFileDescriptor(long, long, long)
. Returns 0
otherwise.
public long fileOffset ()
Returns the model file offset if Model.ModelLocation
was created with Model.ModelLocation.fromFileDescriptor(long, long, long)
. Returns 0
otherwise.
public String filePath ()
Returns the model file path if Model.ModelLocation
was created with Model.ModelLocation.fromFilePath(String)
or Model.ModelLocation.fromFile(File)
. Returns null
otherwise.
public ByteBuffer modelBuffer ()
Returns the model data if Model.ModelLocation
was created with Model.ModelLocation.fromByteBuffer(ByteBuffer)
. Returns null
otherwise.
public String modelId ()
Returns the unique model id.
public long modelLength ()
Returns the model file length if Model.ModelLocation
was created with Model.ModelLocation.fromFileDescriptor(long, long, long)
. Returns 0
otherwise.
public String modelNamespace ()
Returns the model namespace.

