ArchiveTileByteSource

class ArchiveTileByteSource(archive: ReadOnlyArchive, scheme: String = SLPK_SCHEME) : TileByteSource

TileByteSource that serves tile bytes from an open ReadOnlyArchive instead of the network — the transport behind both the SLPK (I3S) loader and the Cesium 3D Tiles Archive (.3dtiles/3TZ) loader.

Two synthetic URI shapes are supported, distinguished only by how content URIs are produced:

  • jar-style slpk:{archiveId}!/{entryPath} — used by SLPK, whose parser mints every node's content URI explicitly (no relative resolution needed).

  • authority-style 3dtiles://{archiveId}/{entryPath} — used by 3TZ, whose tileset.json is fed to the standard earth.worldwind.layer.ogc3d.tileset.TilesetParser; the scheme://authority/ shape lets its relative-URI resolver splice child content paths with no special-casing.

In both, {archiveId} only disambiguates cache keys when several archives are open at once. A miss returns HTTP-404-shaped so TileFetchQueue's existing non-success handling applies unchanged; no auth or redirects ever occur.

Constructors

Link copied to clipboard
constructor(archive: ReadOnlyArchive, scheme: String = SLPK_SCHEME)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()

Release transport resources (close the HTTP client / archive handle). Idempotent.

Link copied to clipboard
open suspend override fun get(uri: String, headers: Map<String, String> = emptyMap()): TileByteResponse

Fetch raw bytes for an already-rewritten uri. A miss is a non-success TileByteResponse.statusCode, not a throw; only real transport failures throw.

Link copied to clipboard
open override fun handles(uri: String): Boolean

True when this source handles uri's scheme (http(s):, slpk:, 3dtiles:).