public class CesiumResource extends Object
| Constructor and Description |
|---|
CesiumResource(String uri,
CesiumResourceBehavior behavior)
Initializes a new instance.
|
CesiumResource(URI uri,
CesiumResourceBehavior behavior)
Initializes a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static CesiumResource |
fromImage(RenderedImage image,
CesiumImageFormat imageFormat)
Create a CZML resource from an image loaded into memory.
|
static CesiumResource |
fromStream(InputStream stream,
CesiumImageFormat imageFormat)
Create a CZML resource from a stream containing image data.
|
static CesiumResource |
fromStream(InputStream stream,
String mimeType)
Create a CZML resource from a stream.
|
CesiumResourceBehavior |
getBehavior()
Gets how the resource is to be included in the document.
|
String |
getUri()
Gets the URI of the resource.
|
public CesiumResource(URI uri, @Nonnull CesiumResourceBehavior behavior)
uri - The URI of the resource.behavior - The enumeration describing how the resource is to be included in the document.public CesiumResource(String uri, @Nonnull CesiumResourceBehavior behavior)
uri - The URI of the resource.behavior - The enumeration describing how the resource is to be included in the document.public final String getUri()
@Nonnull public final CesiumResourceBehavior getBehavior()
public static CesiumResource fromImage(RenderedImage image, @Nonnull CesiumImageFormat imageFormat)
image - The image to write.imageFormat - The format of the image.CesiumResource containing the image data as a data URI.public static CesiumResource fromStream(InputStream stream, @Nonnull CesiumImageFormat imageFormat)
stream - The stream containing image data to write.imageFormat - The format of the image.CesiumResource containing the image data as a data URI.public static CesiumResource fromStream(InputStream stream, String mimeType)
stream - The stream containing data to write.mimeType - The mime type of the data.CesiumResource containing the data as a data URI.