public interface Asset
Router.assets(String)
Modifier and Type | Interface and Description |
---|---|
static class |
Asset.Forwarding
Forwarding asset.
|
Modifier and Type | Method and Description |
---|---|
default String |
etag() |
long |
lastModified() |
long |
length() |
default String |
name()
Examples:
|
String |
path()
Examples:
|
URL |
resource() |
InputStream |
stream() |
MediaType |
type() |
@Nonnull default String name()
GET /assets/index.js -> index.js GET /assets/js/index.js -> index.js
@Nonnull String path()
GET /assets/index.js -> /assets/index.js GET /assets/js/index.js -> /assets/js/index.js
@Nonnull default String etag()
path()
, lastModified()
and
length()
.long length()
-1
if undefined.long lastModified()
@Nonnull InputStream stream() throws Exception
Exception
- If content can't be read it.Copyright © 2019. All rights reserved.