public final class StaticContent
extends java.lang.Object
Constructor and Description |
---|
StaticContent(java.lang.String path,
java.lang.String contentType,
byte[] content)
Create a new static content object.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent()
Get the content.
|
java.lang.String |
getContentType()
Get the content type of the content, for example application/json.
|
java.lang.String |
getPath()
Get the path that the content should be served under, for example /document.json.
|
public StaticContent(java.lang.String path, java.lang.String contentType, byte[] content)
path
- the path that the content should be served under, for example /document.json.contentType
- the content type of the content, for example application/json.content
- the content.public java.lang.String getPath()
public java.lang.String getContentType()
public byte[] getContent()