Skip to content

ClasspathAsset

final class ClasspathAsset
Extends: Asset
Package: dev.joid.lib.asset.impl · Module: core · Source: ClasspathAsset.java

An asset found in the classpath, such as a file packed in the jar of your application.

A String path without a scheme gives one when the classpath has it, with or without a leading /; its id is classpath: followed by the path.

ReturnsSignatureSummary
ClasspathAssetof(String path, URL url) factoryCreates the asset of the classpath path, read from url.

ReturnsSignatureSummary
InputStreamopen()Opens the URL of the resource.
FilegetFile()Returns the file when the classpath entry is a folder on disk, or null inside a jar.
URLgetUrl()Returns the URL the asset is read from.
StringgetPath()Returns the classpath path, without a leading /.
Inherited from Asset (5)

isRemote · peek · read · toString · getUniqueId

ClasspathAsset of(String path, URL url) factory

Creates the asset of the classpath path, read from url.

InputStream open()

Opens the URL of the resource.

File getFile()

Returns the file when the classpath entry is a folder on disk, or null inside a jar.

URL getUrl()

Returns the URL the asset is read from.

String getPath()

Returns the classpath path, without a leading /.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page