Package com.luciad.loaders
Interface IDataLoader
- All Known Implementing Classes:
InMemoryDataLoader
public interface IDataLoader
Interface for loading data from a path into memory.
See this related article for an example of how you can customize 3D tiles data loading.
-
Method Summary
Modifier and TypeMethodDescriptionload(String path, CancellationToken token) Returns the data resource loaded from the given path.
-
Method Details
-
load
@NotNull DataEntity load(@NotNull String path, @NotNull CancellationToken token) throws IOException, UnsupportedOperationException Returns the data resource loaded from the given path.The download process can be canceled by the means of the
cancellation token. It is up to the implementer to verify that the cancellation token state is set totrueduring the operation. When it is set totrue, it indicates that a resource is no longer needed. Throwing ajava.util.concurrent.CancellationExceptionthen reports the load as canceled rather than as failed.- Parameters:
path- Path to the resource.token- Cancellation token.- Returns:
- the data resources as
DataEntity. - Throws:
IOException- when loading the data fails.UnsupportedOperationException- when the loader cannot handle the given path (for example, an unsupported scheme or protocol).
-