public static class StaticResourceServlet.StaticResource
extends java.lang.Object
Constructor and Description |
---|
StaticResource(java.lang.String name,
java.lang.String contentType,
java.lang.Long lastModified,
java.lang.Long length,
java.io.InputStream contentStream)
Constructor
|
StaticResource(java.lang.String name,
java.lang.String contentType,
java.lang.Long lastModified,
java.lang.Long length,
java.io.InputStream contentStream,
java.lang.Boolean asAttachment)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getContentStream() |
java.lang.String |
getContentType() |
java.lang.String |
getDisposition() |
java.lang.String |
getETag() |
java.lang.Long |
getLastModified() |
java.lang.Long |
getLength() |
java.lang.String |
getName() |
public StaticResource(java.lang.String name, java.lang.String contentType, java.lang.Long lastModified, java.lang.Long length, java.io.InputStream contentStream)
name
- Resource name. Cannot be null.contentType
- Content type of resource. If null, content type will be specified by resource name.lastModified
- Last modification. If null, current time will be setlength
- Resource length. Cannot be null.contentStream
- Resource content as stream. Cannot be null.java.lang.NullPointerException
- If name, length or contentStream is nullpublic StaticResource(java.lang.String name, java.lang.String contentType, java.lang.Long lastModified, java.lang.Long length, java.io.InputStream contentStream, java.lang.Boolean asAttachment)
name
- Resource name. Cannot be null.contentType
- Content type of resource. If null, content type will be specified by resource name.lastModified
- Last modification. If null, current time will be setlength
- Resource length. Cannot be null.contentStream
- Resource content as stream. Cannot be null.asAttachment
- If true then resource disposition will be "attachment", if false then "inline", if null then null.java.lang.NullPointerException
- If name, length or contentStream is nullpublic java.lang.String getName()
public java.lang.String getContentType()
public java.lang.Long getLastModified()
public java.lang.Long getLength()
public java.io.InputStream getContentStream()
public java.lang.String getETag()
public java.lang.String getDisposition()