Interface ModelSource
-
public interface ModelSourceInterface for different model source implementations.- Since:
- 1.0.0
- Author:
- Nestor Martourez Abiangang A.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes any resources associated with this source.StringgetLocation()Gets the source location/URI.longgetSize()Gets the size of the model in bytes if available.booleanisAccessible()Checks if the model source is accessible.InputStreamopenStream()Opens an input stream to read the model.
-
-
-
Method Detail
-
openStream
InputStream openStream() throws Exception
Opens an input stream to read the model.- Returns:
- InputStream to model data
- Throws:
Exception- if model cannot be loaded
-
getLocation
String getLocation()
Gets the source location/URI.- Returns:
- source location string
-
isAccessible
boolean isAccessible()
Checks if the model source is accessible.- Returns:
- true if accessible, false otherwise
-
getSize
long getSize()
Gets the size of the model in bytes if available.- Returns:
- size in bytes, or -1 if unknown
-
close
void close()
Closes any resources associated with this source.
-
-