Model Stay organized with collections Save and categorize content based on your preferences.
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
| class | Model.Builder | Builder class. | |
| class | Model.ModelLocation | Where to load the model from. | |
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 | modelId() Returns the unique model id. |
| long | modelLength() Returns the model file length if Model.ModelLocation was created with Model.ModelLocation.fromFileDescriptor(long, long, long). |
| String | modelNamespace() Returns the model namespace. |
Inherited Method Summary
Public Methods
public longfileDescriptor()
Returns the model file descriptor if Model.ModelLocation was created with Model.ModelLocation.fromFileDescriptor(long, long, long). Returns0 otherwise.
public longfileOffset()
Returns the model file offset if Model.ModelLocation was created with Model.ModelLocation.fromFileDescriptor(long, long, long). Returns0 otherwise.
publicStringfilePath()
Returns the model file path if Model.ModelLocation was created with Model.ModelLocation.fromFilePath(String) or Model.ModelLocation.fromFile(File). Returnsnull otherwise.
publicByteBuffermodelBuffer()
Returns the model data if Model.ModelLocation was created with Model.ModelLocation.fromByteBuffer(ByteBuffer). Returnsnull otherwise.
publicStringmodelId()
Returns the unique model id.
public longmodelLength()
Returns the model file length if Model.ModelLocation was created with Model.ModelLocation.fromFileDescriptor(long, long, long). Returns0 otherwise.
publicStringmodelNamespace()
Returns the model namespace.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.